Skip to content

Remove old multi_match view - #125

Merged
orangejulius merged 1 commit into
masterfrom
remove-old-multi_match
Aug 27, 2020
Merged

orangejulius merged 1 commit into
masterfrom
remove-old-multi_match

Conversation

@orangejulius

@orangejulius orangejulius commented Aug 26, 2020 •

Copy link
Copy Markdown
Member

I don't remember writing it, but since #14 in early 2016(!) we have had a general purpose view for multi_match queries.

This view doesn't fit our current pattern for keeping general purpose (i.e. corresponding to built in Elasticsearch query) views in the view/leaf directory, and it doesn't support as much functionality as the multi_match view @Joxit made for us in #114 last year.

This PR removes the older view, and in the process converts the admin_multi_match view over to using the new multi_match leaf query.

While I don't think anything in the Pelias API uses the old multi_match query directly, this removal will require changes to the
API tests because of two minor differences in the final output:

  • cutoff_frequency is removed. This would have been possible to keep, but with cutoff_frequency being redundant in ES7+, it's not worth the effort
  • type is a required parameter of the new multi_match leaf query. This is because the type is used by the view to determine what other parameters are allowed.
@orangejulius
orangejulius force-pushed the remove-old-multi_match branch from ebdc5ae to cad3b72 Compare August 26, 2020 18:24
BREAKING CHANGE: the old multi_match view is removed.

I don't remember writing it, but since
#14 in early 2016(!) we have had a
general purpose view for
[multi_match](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html)
queries.

This view doesn't fit our current pattern for keeping general purpose
(i.e. corresponding to built in Elasticsearch query) views in the
`view/leaf` directory, and it doesn't support as much functionality as
the `multi_match` view @Joxit made for us in
#114 last year.

This PR removes the older view, and in the process converts the
`admin_multi_match` view over to using the new `multi_match` leaf query.

While I don't think anything in the Pelias API uses the old
`multi_match` query directly, this removal will require changes to the
API tests because of minor differences in the final output.
@orangejulius
orangejulius force-pushed the remove-old-multi_match branch from cad3b72 to ae426ae Compare August 26, 2020 18:43

@Joxit Joxit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goodbye old multi_match 👋

@missinglink missinglink left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@orangejulius
orangejulius merged commit fa076f4 into master Aug 27, 2020
@orangejulius
orangejulius deleted the remove-old-multi_match branch August 27, 2020 15:04
@orangejulius

Copy link
Copy Markdown
Member Author

Just to be sure, before merging this we ran it on a split test on Geocode Earth and did not see any performance regressions. Elasticsearch claims that cutoff_frequency is no longer used in ES7 but you never know, so it's good to confirm. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants