-
Notifications
You must be signed in to change notification settings - Fork 5
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
Get exact result for ht parameter and not the first one #12
Comments
I came across this issue again. Is there a fast to fix solution for this? |
In theory it should only zoom if there is an exact match, see [1] (ht being equal to st here) [1] https://github.com/qgis/qwc2/blob/master/utils/SearchProviders.js#L425 Edit: exact match => only one result |
I think this is not an issue with the SearchProviders from the qwc2 app as the fulltext search service gives me more than one result: From this results the first entry is than passed to the SearchProviders for zooming - and at this point this is the "exact match". |
So you mean that with |
Yes, that's exactly the behavior. |
This is ultimately the behaviour of solr, not the qwc-fulltext-search-service. The fulltext search service sends |
I see the complexity here ... Actually I thought about a solution, where not the first search result, which is get with Requesting What about something like passing the Requesting And if this result is empty ( |
This won't work because |
Mh, so there is no good solution for this. Indeed it is possible to zoom to the exact result using both |
I couldn't leave it behind ... ;-) If the Solr is set up following the documentation [1] actually there should exist a So as this field should be part of the db and the entity configuration, it could be used as suggested above. And if the field is missing for some reason, there would be the fall back to use the [1] https://qwc-services.github.io/master/topics/Search/#fulltext-search-with-solr-backend |
No, the |
It is a little bit complicated to zoom to a feature by only passing the search text with the
ht
parameter, if the search term results in more than one entry. The map will zoom to the first entry of the result list and not to the one with the exact search phrase.Examples with our system:
https://kartenportal.jena.de/?hp=kartenportal_qwc_adressen_v&ht=Markt%207
Searching for "Markt 7" will result in this list in our case:
As "Holzmarkt 7" ist the first entry, the map will zoom to the related feature and not to the one for "Markt 7"
The workaround is, to pass the phrase additional in the
hf
parameter, like:https://kartenportal.jena.de/?hp=kartenportal_qwc_adressen_v&hf=[["display"%2C"%3D"%2C"Markt%207%20(Adresse)"]]&ht=Markt%207%20
While this is a little bit bulky, wouldn't it be a better way, to zoom to the element with the exact phrase if there is one?
The text was updated successfully, but these errors were encountered: