locked
Azure Search scoring with document in different shards RRS feed

  • Question

  •                  

                      All indexes in Azure Search are split into multiple shards allowing us for quick scale up and scale downs. When a search request is issued, it’s issued against each of the shards independently. The result sets from each of the shards are then merged and ordered by score.

                      It’s not possible to assume on which shard any given document will be placed. It means that in your scenario, in which you have three instances of every document, even with scoring profiles disabled, if one of those documents lands on a different shard than the other two, its score will be slightly different.

                       Is it possible in azure search to calculate score of document against all document in index so the ordering by score will be correct?

                     Considering following example, where user is searching for candidate having '.net' skill or profile and get following result : 

     
              1. adhikar patil-2

                SkillDetails(.Net, javascript, mvc)    Score : 0.22148106  Profile:Net developer

              2. adhikar patil-37

                SkillDetails(net)                                Score : 0.06277244       Profile :net

             3. adhikar patil-1

                 SkillDetails(net)                               Score : 0.06277244       Profile :net

             4 . adhikar patil-39

                 SkillDetails(.Net, javascript, mvc)   Score : 0.035309497     Profile :Net developer

              5. adhikar patil-38

                SkillDetails(.Net, javascript, mvc)   Score : 0.035309497     Profile :Net developer


                        In the above case we are searching for candidate having  '.net' skill in profile or in skill set. For this search query we get  result order by score of profile in descending order. Here,  result 1,4 and 5 having same document but they are in different shards so their score is different. How we can solve this problem?

                       
    Monday, September 23, 2019 6:15 AM

All replies

  • I believe the feedback that was shared by the Azure Search product group on this post is still correct in that we do not recommend sorting results based on scores when pulling results from multiple shards.

    I have reached out to see if anything has changed since the above thread and will let you know if we hear anything back.

    Tuesday, September 24, 2019 9:02 AM