Despite having used the Elasticsearch match_phrase query for years, we actually don't know much about the details of its scoring.
In particular, does slop have any impact on the score? For example, consider the query main street and two documents with values main street and street main.
With slop: 1, both documents will match the query. But do they get the same score? If they do, then setting high slop values is totally fine. Documents with "better" matches will naturally be scored higher. If they don't, then match_phrase queries are a little harder to work with out of the box.
Despite having used the Elasticsearch match_phrase query for years, we actually don't know much about the details of its scoring.
In particular, does
slophave any impact on the score? For example, consider the querymain streetand two documents with valuesmain streetandstreet main.With
slop: 1, both documents will match the query. But do they get the same score? If they do, then setting high slop values is totally fine. Documents with "better" matches will naturally be scored higher. If they don't, thenmatch_phrasequeries are a little harder to work with out of the box.