Using Azure Search, I'm struggling to combine fuzzy search with custom scoring profile.
If I search without fuzziness, the score is calculated properly. If I add fuzziness to search query it looks like my custom rules are not applied.
Example scenario (api-version=2015-02-28)
Create new Index (C# SDK 1.1):
Name = "SomeName",
Fields = new[]
{
new Field("Title", DataType.String) { IsSearchable = true},
new Field("Author", DataType.String) { IsSearchable = true}
}
ScoringProfiles = new List<ScoringProfile>
{
new ScoringProfile()
{
Name = "SomeScoringProfile",
TextWeights = new TextWeights()
{
Weights = new Dictionary<string, double>
{
["Title"] = 200,
["Author"] = 10
}
}
}
}
Queries (in Azure Portal, I'm using Lucene syntax) I've created two documents, one has Title= Matrix, another Author= Matrix.
Query without fuzziness&queryType=full&search=Title:Matrix OR Author:Matrix&scoringProfile=SomeScoringProfile
Score result: Document with Title: 0.11, Document with Author: 0.011
Query with fuzziness&queryType=full&search=Title:Matrix~2 OR Author:Matrix~2&scoringProfile=SomeScoringProfile
Score result: Document with Title: 0.15, Document with Author: 0.15 (the same !)
Can you help me with trying to figure out what is wrong with this example ? Can this functionality be achieved with a different technique ?
&queryType=full&search=Title:Matrix~2^200 OR Author:Matrix~2^10&scoringProfile=SomeScoringProfile
– femtoRgon