feat(addressSearchUsingIds): Set default street slop to 1#1322
Merged
orangejulius merged 1 commit intomasterfrom Oct 3, 2019
Merged
feat(addressSearchUsingIds): Set default street slop to 1#1322orangejulius merged 1 commit intomasterfrom
orangejulius merged 1 commit intomasterfrom
Conversation
Member
Author
|
@Joxit i would be curious to hear if this PR allows any interesting new queries to pass in France :) |
Member
Author
|
The acceptance tests all pass with this change, and I'll also add some additional acceptance tests for new queries that now pass. |
7991f18 to
9d6455b
Compare
Joxit
approved these changes
Jun 20, 2019
Member
Joxit
left a comment
There was a problem hiding this comment.
I did some tests, with my favourite address 40 Rue de l'Arsenal, Bordeaux. It seems to works with 40 Rue l'Arsenal, Bordeaux (but not for 40 Rue Arsenal, bordeaux but it's normal 😄.
The same for Boulevard du Général de Gaulle, Sarcelles, France and Boulevard Général de Gaulle, Sarcelles, France
I haven't example where the slop should be higher than 1 🤔. This will not replace a fuzzy search, but it's good enough 👍
So... LGTM 🚀
orangejulius
added a commit
to pelias/query
that referenced
this pull request
Oct 3, 2019
This change builds on the previous series of PRs (#112, and #111) to support the `slop` parameter on the `match_phrase` queries responsible for handling street addresses. Replaces #101 Connects pelias/api#1322
92e66f5 to
3e64775
Compare
Combined with pelias/query#101, this change allows for improved matching of streets when using the addressSearchUsingIDs query (the first query executed by the search endpoint). Essentially, by allowing a `slop` of 1 in the `match_phrase` clauses of the Elasticsearch query, its now possible to omit a single word _in the middle_ of a street name and still match it. Omitting words at the start or end of the street name has been supported since pelias/schema#310. Some examples of where this helps: | Actual street name | Newly matching input text | | --- | --- | | SE Martin Luther King Jr Blvd | Martin Luther King Blvd | | Carrer de Balmes | Carrer Balmes | Since pelias/query#113 has been merged, this commit will result in changes to how queries behave.
3e64775 to
142a96f
Compare
orangejulius
added a commit
to pelias/acceptance-tests
that referenced
this pull request
Oct 3, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Combined with pelias/query#101, this change allows for improved matching of streets when using the addressSearchUsingIDs query (the first query executed by the search endpoint).
Essentially, by allowing a
slopof 1 in thematch_phraseclauses of the Elasticsearch query, its now possible to omit a single word in the middle of a street name and still match it. Omitting words at the start or end of the street name has been supported since pelias/schema#310.Some examples of where this helps: