Skip to content
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

Smart suggest using search #1180

Closed
wants to merge 1 commit into from
Closed

Smart suggest using search #1180

wants to merge 1 commit into from

Conversation

edsu
Copy link
Contributor

@edsu edsu commented Aug 15, 2024

Implement "smart suggest" using the Solr select endpoint rather than suggest in order to get the document IDs for the title results, so they can be directly linked to.

When the user types in a string a search for the string with * appended of dct_title_ti and dct_spatial_tmi is performed. The results are stored in an instance of the new Suggestions class which has methods to return locations, datasets and maps. Each of the suggestions is an instance of Suggestion which can highlight the query.

TODO: the Suggester, Suggestions and Suggestion classes need unit tests. I tested with 4k documents and it seemed to perform similarly to the suggest endpoint, but it will be useful to see how it performs with more.

Closes #1047

@edsu edsu changed the title Suggest using search Smart suggest using search Aug 15, 2024
@edsu edsu force-pushed the bl8-auto-search branch 2 times, most recently from 0bb3954 to 5a3339f Compare August 21, 2024 14:00
Implement "smart suggest" using the Solr select endpoint rather than
suggest in order to get the document IDs for title results.

When the user types in a string a search for the string plus * of
dct_title_ti and dct_spatial_tmi is performed. The results are stored in
an instance of the Suggestions class which has methods to return
locations, datasets and maps. Each of the suggestions is an instance of
Suggestion which can highlight the query.
@edsu
Copy link
Contributor Author

edsu commented Aug 29, 2024

We decided not to pursue using a Search approach. This was mostly because using the newly configured suggest index in #1154 will guarantee that a certain number of matches from titles and locations are returned, which is not the case when doing a single search against the title and location fields.

@edsu edsu closed this Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant