A quick implementation test of the Solr Group selecting feature - #6000
Draft
christinach wants to merge 3 commits into
Draft
A quick implementation test of the Solr Group selecting feature#6000christinach wants to merge 3 commits into
christinach wants to merge 3 commits into
Conversation
http://localhost:3000/catalog?fl=title_display%2Choldings_1display&group[field]=cluster_id&search_field=all_fields&q=cluster_id%3Aa50a7e39-e162-4300-ba48-9dd1f6a80283 related to pulibrary/bibdata#3382 related to pulibrary/dacs_handbook#321
Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>
…iew it in the response Update view to render the grouped results Update result grouping method to return in the search results response the grouped documents so that we can view the clusters related to pulibrary/bibdata#3382 related to pulibrary/dacs_handbook#321 example: `http://localhost:62987/solr/bibdata-core-development/select?fl=title_display,holdings_1display,cluster_id,&group=true&group.field=cluster_id&rows=1000&group.limit=-1&sort=score%20desc&group.sort=score%20desc` - rows is set to 1000 so that it lists all the groups. we know that are less than 1000 - group needs to be set to true so that it groups the results - group.field is cluster_id - group.limit is set to -1 so that we get all documents per group - sort is score desc so that we sort groups by relevance score first - group.sort is score desc so that the documents within each group are sorted by relevance score with highest first
christinach
marked this pull request as draft
July 2, 2026 17:58
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.
This is a quick proof of concept for Solr's result grouping feature. Assuming the XML marc files are preprocessed and each cluster is assigned a unique cluster_id - in our case, a uuid- we can group on cluster_id and configure SOLR to return 'grouped' results.
Blacklight supports rendering grouped results and includes a view component that I didn't test. We can customize this work using Blacklight's configuration settings, or not.
The grouped search results are generated in SOLR . There is no primary cluster record indexed with merged metadata. If we decide to index a primary cluster record, we can revisit this approach and evaluate it in that context.
Next steps:
We could aggregate the holdings of each cluster into the record with the highest score and retain only that record in the cluster (primary record).
We're still evaluating the different approaches for implementing deduplication.
related to pulibrary/bibdata#3382
related to pulibrary/dacs_handbook#321
related to pulibrary/pul_solr#555