-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elasticsearch2 #138
Merged
Merged
Elasticsearch2 #138
Conversation
This file contains 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
Created a super-convoluted, yet necessary, series of built-in filters to not prefix n-gram house numbers. That is, from `14a`, we want `14` and `14a` but not `1`. eg: 14a w main st surround_single_characters_with_!s -> [14a, !w!, main, st] house_number_word_delimiter -> [14, 14a, a, !w!, main, st] remove_single_characters -> [14, 14a, !w!, main, st] surround_house_numbers_with_!s -> [!14!, !14a!, !w!, main, st] peliasOneEdgeGramFilter -> [!, !1, !14, !14!, !, !1, !14, !14a, !14a!, !, !w, !w!, m, ma, mai, main, s, st] eliminate_tokens_starting_with_! -> ["", "", "", !14!, "", "", "", "", !14a!, "", "", w, m, ma, mai, main, s, st] remove_encapsulating_!s -> ["", "", "", 14, "", "", "", "", 14a, "", "", w, m, ma, mai, main, s, st] notnull -> [14, 14a, w, m, ma, mai, main, s, st] unique -> [14, 14a, w, m, ma, mai, main, s, st]
c89f065
to
c8a9e70
Compare
|
1 similar comment
|
LGTM |
orangejulius
added a commit
that referenced
this pull request
Oct 31, 2019
This removes the complex filtering logic known as the "complicated housenumber filter", or sometimes even the "goldbergian housenumber filter", originally described in #133 and merged as part of our ES2 upgrade (#138). The housenumber filter was made quite a long time ago, with the intention of removing partial numeric tokens. It's quite a lot of code, rather hard to understand, and may actually cause more problems than it sovles. In particular, fully numeric postal codes cannot be found with autocomplete until the postal code is entered completely (see pelias/pelias#676). Since this code was written, we've improved autocomplete considerably, and having some tokens missing could be resulting in autocomplete not doing its job as well as it could. However, there could also be downsides: this will increase the hit count for numeric inputs dramatically, so it could cause more slow queries.
orangejulius
added a commit
that referenced
this pull request
Oct 31, 2019
This removes the complex filtering logic known as the "complicated housenumber filter", or sometimes even the "goldbergian housenumber filter", originally described in #133 and merged as part of our ES2 upgrade (#138). The housenumber filter was made quite a long time ago, with the intention of removing partial numeric tokens. It's quite a lot of code, rather hard to understand, and may actually cause more problems than it sovles. In particular, fully numeric postal codes cannot be found with autocomplete until the postal code is entered completely (see pelias/pelias#676). Since this code was written, we've improved autocomplete considerably, and having some tokens missing could be resulting in autocomplete not doing its job as well as it could. However, there could also be downsides: this will increase the hit count for numeric inputs dramatically, so it could cause more slow queries.
orangejulius
added a commit
that referenced
this pull request
Oct 31, 2019
This removes the complex filtering logic known as the "complicated housenumber filter", or sometimes even the "goldbergian housenumber filter", originally described in #133 and merged as part of our ES2 upgrade (#138). The housenumber filter was made quite a long time ago, with the intention of removing partial numeric tokens. It's quite a lot of code, rather hard to understand, and may actually cause more problems than it sovles. In particular, fully numeric postal codes cannot be found with autocomplete until the postal code is entered completely (see pelias/pelias#676). Since this code was written, we've improved autocomplete considerably, and having some tokens missing could be resulting in autocomplete not doing its job as well as it could. However, there could also be downsides: this will increase the hit count for numeric inputs dramatically, so it could cause more slow queries.
orangejulius
added a commit
that referenced
this pull request
Nov 7, 2019
This removes the complex filtering logic known as the "complicated housenumber filter", or sometimes even the "goldbergian housenumber filter", originally described in #133 and merged as part of our ES2 upgrade (#138). The housenumber filter was made quite a long time ago, with the intention of removing partial numeric tokens. It's quite a lot of code, rather hard to understand, and may actually cause more problems than it sovles. In particular, fully numeric postal codes cannot be found with autocomplete until the postal code is entered completely (see pelias/pelias#676). Since this code was written, we've improved autocomplete considerably, and having some tokens missing could be resulting in autocomplete not doing its job as well as it could. However, there could also be downsides: this will increase the hit count for numeric inputs dramatically, so it could cause more slow queries.
missinglink
pushed a commit
that referenced
this pull request
Nov 20, 2019
This removes the complex filtering logic known as the "complicated housenumber filter", or sometimes even the "goldbergian housenumber filter", originally described in #133 and merged as part of our ES2 upgrade (#138). The housenumber filter was made quite a long time ago, with the intention of removing partial numeric tokens. It's quite a lot of code, rather hard to understand, and may actually cause more problems than it sovles. In particular, fully numeric postal codes cannot be found with autocomplete until the postal code is entered completely (see pelias/pelias#676). Since this code was written, we've improved autocomplete considerably, and having some tokens missing could be resulting in autocomplete not doing its job as well as it could. However, there could also be downsides: this will increase the hit count for numeric inputs dramatically, so it could cause more slow queries.
missinglink
pushed a commit
that referenced
this pull request
Nov 20, 2019
This removes the complex filtering logic known as the "complicated housenumber filter", or sometimes even the "goldbergian housenumber filter", originally described in #133 and merged as part of our ES2 upgrade (#138). The housenumber filter was made quite a long time ago, with the intention of removing partial numeric tokens. It's quite a lot of code, rather hard to understand, and may actually cause more problems than it sovles. In particular, fully numeric postal codes cannot be found with autocomplete until the postal code is entered completely (see pelias/pelias#676). Since this code was written, we've improved autocomplete considerably, and having some tokens missing could be resulting in autocomplete not doing its job as well as it could. However, there could also be downsides: this will increase the hit count for numeric inputs dramatically, so it could cause more slow queries.
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.
goldbergianPeliasHousenumber
to ensure that numeric values are treated as whole tokens rather than creating prefixes.dynamic_templates
so now all_type
have the same config