Merged
Conversation
Member
|
@liseli Prior to the changes regarding quoting, did the users' reported title search return any results? I'm guessing not, just double checking. |
Contributor
Author
The user hasn't reported any previous results for this query. To provide some context, I'm referencing the results from an earlier version of the repository—before any changes were made. I'm using a specific commit to compare the previous behavior with the current one.
|
aelkiss
approved these changes
Mar 10, 2026
Rebuilt the and/or value creation to always inject AND/OR between the escaped pieces Updated unit test adding double quotes phrase query Join phrases with operators before creating the semantic structucture to handle queries like apple OR orange
e8bfcfb to
5927a46
Compare
moseshll
approved these changes
Mar 12, 2026
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 PR fixes the issues reported on the Jira ticket
The cause of these issues was differences in the Solr query generated before and after refactoring the search application. To have the same queries on both versions, I have
onephraseclause is always wrapped in quotes - that is a previous behavior that In Solr, means an exact match queryand/orclause creation process to consistently include AND/OR between the escaped parts. Some edge cases didn't quite fit this rule. For example, in the input query NEUTRON ELASTIC- AND INELASTIC-SCATTERING CROSS SECTIONS, since the string has anANDoperator, a onephrase was produced instead of combining the tokens with AND/OR operators.This branch can be tested in https://test.catalog.hathitrust.org/Search/Home. Some of the queries I've tested:
title: Spencer A. Samuels & Company, Ltd, 1972 --> 0 results
title: Spencer A. Samuels & Company --> 3 results
title: NEUTRON ELASTIC- AND INELASTIC-SCATTERING CROSS SECTIONS FOR Mg IN THE ENERGY RANGE 4.19 TO 8.56 MeV --> 0 results
title: "Kilmacolm : a parish history" --> 1 result