Skip to content

feat(fallback queries): Support slop parameter on street queries#113

Merged
orangejulius merged 1 commit intomasterfrom
street-slop
Oct 3, 2019
Merged

feat(fallback queries): Support slop parameter on street queries#113
orangejulius merged 1 commit intomasterfrom
street-slop

Conversation

@orangejulius
Copy link
Copy Markdown
Member

@orangejulius orangejulius commented 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.

Unlike #101 this method does not set the slop parameter unconditionally, and no changes to queries will result unless the slop parameter is configured such as with pelias/api#1322.

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
@orangejulius orangejulius merged commit 671404e into master Oct 3, 2019
@orangejulius orangejulius deleted the street-slop branch October 3, 2019 18:33
orangejulius added a commit to pelias/api that referenced this pull request Oct 3, 2019
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.
orangejulius added a commit to pelias/api that referenced this pull request Oct 3, 2019
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.
orangejulius added a commit to pelias/api that referenced this pull request Oct 3, 2019
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.
orangejulius added a commit to pelias/api that referenced this pull request Oct 4, 2019
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant