Atlas Search | Lucene Keyword analyzer case insensitive

Hey Folks,

We have an text field where we want to query for exact matches using Atlas Search.

The analyzer Lucene.Keyword seems to be handy for doing such exact matches. However one issue that I have been facing is that Lucene.Keyword doesnt support case insensitive search which is one of our requirements. Other analyzers dont seem quite apt to our use case, as we do not want to break up the query field in punctuations/whitespaces etc.

Any ideas on how i can use lucene keyword and make it case insensitve at the same time.

Thanks

1 Like

For anyone facing a similar issue as this, I was able to fix it by using a custom analyzer and combining it with the keyword tokeniser and a lowercase token filter

The sample code is as follows

"analyzers": [
    {
      "charFilters": [],
      "name": "search_keyword_lowercaser",
      "tokenFilters": [
        {
          "type": "lowercase"
        }
      ],
      "tokenizer": {
        "type": "keyword"
      }
    }
  ]
6 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.