Hi,
I’m running following query on atlas cloud
[
{
$search: {
compound: {
must: [
{
text: {
path: "site",
query: "test",
},
},
{
text: {
path: "objectKey",
query: "product",
},
},
{
regex: {
path: ["name"],
query: "(.*)yearly(.*)",
},
},
],
},
},
},
{ $sort: { displayOrder: -1 } },
{ $skip: 0 },
{ $limit: 10 },
]
Here I’m trying to match the name using regular expression. “name” field is indexed using lucene.keyword. I’m expecting that it will do case insensitive search but it’s not. If I do “Yearly” then it works but with “yearly”, it’s not working.
Do we need to do any changes in index so it can work with case insensitive?
Thanks,