Search code examples
azure-cognitive-servicesazure-cognitive-search

Can Semantic Search capable enough to find a synonymous word for a category fields


I have a list of Categories which can contain "Depression, Anxiety..." When I apply a semantic configuration with Categories in both the content field and Keywords Fields in semantic configuration for more hits. I observe that any term such as Depressed which is not present directly(depression is present) semantic search doesn't seem to return any result which consists of Depression. Why is that?


Solution

  • As mentioned in your other StackOverflow question, semantic does not influence what documents get matched, it only affects how they are ranked (as well as adds additional capabilities such as captioning and answers). If a document does not match your search term using the inverted index, it will not be retrieved. Regarding Depression and Depressed, it all depends on what analyzer you are using. Certain language analyzer (such as the en.lucene analyzer), will stem "depressed" and "depression" into "depress", so both will match each other. You can play around with the Analyze API to understand how words are tokenized and help you decide which analyzer works best for your scenario.