Description
Unfortunately due to a limitation of the version of ElasticSearch that we use for Find/Search and Navigation we do not have the ability to use the "explain" parameter referenced in the following document to get an exact weight value for term frequency, inverse document frequency, and field-length norm. There are internal discussions around getting this feature available in future releases to make calculating the weight more accessible to customers, but for the time being customers do need to test to see the exact scoring for the scoring of different fields. To request more information on if this has been added to the product you can contact you customer success manager to confirm if product management has added this feature or submit a feature request on our customer feedback page. The following documentation goes into more detail on how term frequency, inverse document frequency, and field-length norm work together, so this would be a good starting point to understanding the weight algorithm.
https://www.elastic.co/guide/en/elasticsearch/guide/2.x/relevance-intro.html
Steps
To get a better idea for the weight of a particular property or use of a search phrase postman can be used to see the weight for particular search terms using the following steps.
1) intercept the JSON for the search that is being used. The process for intercepting the JSON used in the local development environment can be found in the Using Fiddler to capture Find requests KB article.
2) Enter the JSON into Postman. The following screen capture shows an example of this. Note that the service URL and index will need to be populated with the values for the index that is being tested with.
3) Review the total number of results and the maximum weight.
4) The items will be sorted based on the weight. To see if an item is positively or negatively impacted by a particular setting or change simply re-index the site after making a change and confirm if the weight for the item is impacted.
5) If the search is not looking for a particular property or if the output does not contain a field that you would like to search for you can edit the JSON within postman to better test without having to adjust the code. Simply add a field into the query string to have that property be searched or adjust the fields at the bottom of the JSON to change what properties are returned in the results. The following screen captures show these sections respectively.
Please sign in to leave a comment.