allow address_layer_filter to be user configurable - #1473
Draft
missinglink wants to merge 1 commit into
Draft
Conversation
Member
Author
|
I'm going to leave this PR open as DRAFT for now so we can use it for testing, however I don't think I'll merge it as-is, I'd considering addressing the following points before merging:
|
Member
|
In order to allow us to close this PR and/or finish off this thought, I'd propose the second option listed above as the smallest amount of functionality that is worth it to merge:
We'd still have to test it but this would most likely be a positive improvement with little downside. Otherwise we are looking at adding at least one, if not several config options (for example, allowing individual control of this filter for search and autocomplete). |
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.
As discussed in #1274 (comment) the
address_layer_filterisn't everyone's cup-o-tea so we should add some ways of configuring or disabling it on a per-installation basis.As a quick reminder, I'm talking about the bit of code which produces these messages:
The functionality was introduced in #1274 and shouldn't be confused with this similar functionality #1219 and this one #1215 🤷♂️
I'm opening this initially as a DRAFT PR so we can discuss it and come up with something which'll work for most people.
My initial commit introduces a config flag
api.enable_address_layer_filterwhich simply enables/disables the filter.I defaulted it to
trueso it's backward compatible.This would probably be helpful for anyone who's running a small-to-medium sized installation of Pelias, because at under a couple million records you're less likely to suffer from the performance pitfalls which originally motivated us adding it.
What it doesn't solve is the case where someone is running a medium-to-large installation of Pelias because performance will likely be pretty bad for one and two letter inputs.
I would consider allowing finer control of the configuration so that it would remain enabled.. but would not be used in the case where a
focus.pointwas provided since #1323 is providing a means of reducing the hit count for those queries.Also worth noting that having these two different mechanisms for filtering the address layer is confusing, I would like it if we could combine them or delete one of them.