0

Our search service uses Azure Cognitve Search in the following way:

  1. Search non-fuzzy (i.e. with full match of query string).
  2. Search fuzzy (i.e. it's allowed to change 1-2 letters in a query string)
  3. Join results by certain rule.

This way we want to achieve that full match results will always be on the top.

But now we want to introduce a pagination. And to do it with two separate queries is a difficult and not effective task. An alternative would be to somehow create a single query which will combine in itself both fuzzy and non-fuzzy search but with different scoring profiles, one with higher weights for full-match search and another with lower weights for fuzzy search. Like search=rabbit&scoringProfile=highWeightsProfile | seacrh=rabbit~&scoringProfile=lowWeightsProfile

Is there any way to do this, either in API or in SDK? Is there any other alternative solutions to the problem of fuzzy search but with higher scores for full-match?

ded.diman
  • 165
  • 2
  • 12

1 Answers1

0

Boosting individual subqueries with Lucene query syntax worked for me as a good solution. Maybe not that flexible as separate search profiles for fuzzy and non-fuzzy parts, but still good.

ded.diman
  • 165
  • 2
  • 12