Search code examples
azureazure-cognitive-searchazure-search-.net-sdk

Azure Search analyzer is not matching other word tense


I am using the following definition for my Search Field on the index that is being searched

 new Field("Description", DataType.String, AnalyzerName.EnMicrosoft),

using the english microsoft text analyzer, however it does not seem to be matching words as I would expect. When searching against that field with a word like "sliced" Azure search does not return results like "slice", "slices". Similarly when searching for a plural word like "cherries" the singular form "cherry" is not returned, and vise versa. Only instances where by adding an 's' are plural forms returned but that would happen regardless, "dog" would return "dog" or "dogs" or "doggie" because "dog" is just the prefix of each word.

Is there a special parameter that needs to be passed into the search call to "activate" the text analyzer?


Solution

  • It appears that you are issuing prefix search queries. Wildcard search queries, like search=test* or search=te?t, do not go through lexical analysis in Azure Search. If you are indeed issuing wildcard queries, one way to work around is to issue the prefix search query with a regular search query, search=sliced sliced* for example.

    Nate