-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add an advanced search option to "display results in a map" #1754
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
This means that now documents can be partially updated instead of always being completely replaced. This features is not used yet anywhere, but it will be useful when including similarity data to the search engine. #1714
…bled We used to store similarity_state field in the sound model, but this is no longer needed when using the search engine based similarity.
This mode complements get_child mode, and will match parent documents instead of child documents
Also fixed an issue with grouping by pack in similarity search
Now we save geotags data returned from solr in the cache, and load it when computing the bytearray. In this way we only make one solr query (and no DB queries) for showing results in the map, which makes page load quite fast.
This will be useful in map embeds
* Add support for solr-based queries in map * Add navigation links from search page to map page and vice versa * Improvements in map embeds code * Remove old unneeded geotags box code * Use solr backend in tag/user/pack map pages
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.
Issue(s)
#1736
Description
This PR adds an option in the advanced search section to display search results in a map. That option will use a map instead of the paginated list of results to show the results. There is a maximum number of sounds to be shown, as loading time can become slow for high number of results. We should investigate the reason for that. One reason is that we perform 2 Solr queries, one initial query to get the number of results and faceting information, and a second repeated query to get a bytearray for the map. We could cache the results of the first query and use it for the second query. Maybe Solr is already doing that for us, we should check. But I think there might be other reasons that make the loading time slow. We should investigate :)
EDIT: I optimised the code so that when we do the first Solr query we save geotags data (returned by Solr) in the cache, and then use this data when creating the geotags bytearray to show points in the map. This means that we actually need to make no DB queries at all when map mode is enabled which makes page loads really fast.
TODO:
Must be merged after #1753