pelias / schema

elasticsearch schema files and tooling
MIT License
40 stars 76 forks source link

Create integration tests for `match_phrase` score behavior #445

Open orangejulius opened 4 years ago

orangejulius commented 4 years ago

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.