-
Notifications
You must be signed in to change notification settings - Fork 26
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
Allow a negative term for municipality #2059
Allow a negative term for municipality #2059
Conversation
@boris-arkenaar The query parameter |
@janjaap The municipality has quite a list of 'woonplaatsen'. I think it would be more error prone and cumbersome to test a big list of 'woonplaatsen' than having the municipality 'Groningen' and excluding 'midden'. |
And with each and every one of these 'woonplaatsen' you can have the same issue we now have with the municipality 'groningen'. |
|
What I miss in this discussion, is that in a couple of months no one will remember why these quotes are added. I think such kinds of changes should be well documented, and that is why jan jaap's solution might be more robust, even though it might be less efficient. |
The quotes were there already and @janjaap's solution is not changing that. So, something like:
or
instead of:
|
@boris-arkenaar Good suggestion. We can already do that without applying changes to the code base, right? |
All magic now removed. This does mean a breaking change for the configuration. |
closes Signalen#167
For Groningen we ran into a problem.
configuration.map.municipality
was set togroningen
. Turns out there is also a municipality called "Midden-Groningen", having the same keywordgroningen
in there. Therefore the autosuggest of the address lookup gave results of both municipalities, while only results from the municipality of Groningen are desired.Since an exact match on municipality is not possible with PDOK, the workaround could be to exclude the term "midden" in this case. This is done with a dash, as in
-midden
.Double quotes are put around each term to accommodate spaces in a term, like
den bosch
. Putting double quotes around the term-midden
would prevent it from being a negative search term. It should be-midden
, or-"midden"
. Not"-midden"
.Thougt process
To fix this I chose to not put double quotes around a term in case it begins with a dash.
Other possible solutions could be:
Final implementation
Finally decided to go for a fix that removes all magic. More power in the configuration.
For clarity, only string values are allowed now. Not an array anymore.
BREAKING:
So,
"den bosch"
should become"\"den bosch\""
.