locked
What's the algorithme for scoring profile? RRS feed

  • Question

  • I gave fields the weight value and boost value, but it's not easy to understand the regulars the azure search follows.

    How does the azure search engin calculate the scores with the customer score profile weight value?

    What is the score standard i should give to each field. Why should i give the most important field a 10 weight value, and the others 5?  If field1 is just lightly importan than field2, what should i do?

    Wednesday, November 25, 2015 8:44 AM

Answers

  • Hi,

    The Weight value is not absolute, it's a way of comparing importance within the other fields included in the Scoring Profile.

    Let's say your Scoring Profile has 3 fields (News example): Title, Summary, Body.

    Your less important field can have a weight of 1, let's say, the Body.

    Now, for me, the fact that the search words appear on the Summary, is twice as important, so I'll assign 2 to Summary.

    Finally, if the search words appear on the Title, it's way way more important, I can assign a 5 for the Title.

    There is a good documented example about it for the API.

    Taken from the API:

    Weights:
    
    Optional. A name-value pair that specifies a field name and relative weight. Relative weight must be a positive integer. The maximum value is int32.MaxValue. 
    
    You can specify the field name without a corresponding weight. Weights are used to indicate the importance of one field relative to another.
    

    The internal algorithm to define the base score of a field is the TF-IDF (term frequency-inverse document frequency).

    Wednesday, November 25, 2015 5:33 PM

All replies

  • Hi,

    The Weight value is not absolute, it's a way of comparing importance within the other fields included in the Scoring Profile.

    Let's say your Scoring Profile has 3 fields (News example): Title, Summary, Body.

    Your less important field can have a weight of 1, let's say, the Body.

    Now, for me, the fact that the search words appear on the Summary, is twice as important, so I'll assign 2 to Summary.

    Finally, if the search words appear on the Title, it's way way more important, I can assign a 5 for the Title.

    There is a good documented example about it for the API.

    Taken from the API:

    Weights:
    
    Optional. A name-value pair that specifies a field name and relative weight. Relative weight must be a positive integer. The maximum value is int32.MaxValue. 
    
    You can specify the field name without a corresponding weight. Weights are used to indicate the importance of one field relative to another.
    

    The internal algorithm to define the base score of a field is the TF-IDF (term frequency-inverse document frequency).

    Wednesday, November 25, 2015 5:33 PM
  • Note that the documentation you've quoted contains an error. Weights are actually floating-point numbers, not integers. I'm working on getting the article fixed.
    Wednesday, November 25, 2015 6:27 PM
    Moderator
  • Good one Bruce.

    Didn't notice the error on the text.

    Wednesday, November 25, 2015 6:34 PM