Repository navigation
Bugfix/composite property namespace and boost - #1845
Merged
Merged
Conversation
olovy
approved these changes
Oct 2, 2026
olovy
left a comment
Contributor
There was a problem hiding this comment.
LGTM!
Having an additional boolean parameter is a bit unfortunate
Contributor
Author
You're right, better to use the enum instead. Fixed: 44389d2 |
olovy
approved these changes
Oct 2, 2026
kwahlin
force-pushed
the
bugfix/composite-property-namespace-and-boost
branch
from
October 8, 2026 14:37
44389d2 to
8e45029
Compare
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.
Fixes a few things related to libris/definitions#628:
query_string/cross_fieldsrather thansimple_query_string, to get the best (dis_max-like) match, rather than summing the scores from each field. This avoids scores from e.g. bothsubject._strandsubject.termComponentList._str, which would otherwise always favor complex subjects in the relevancy ranking with the new extendedsubject:filter.Property.getProperty(..), which included hard-coded namespace handling, with a more generalDisambiguate.getPropertyByKey(..), which resolves a known property key against an ordered list of namespaces the same way Disambiguate.mapSingleKey(..) already does. This fixes an immediate bug where:subjectwas incorrectly parsed asls:subjecthere, while also adding more flexibility for controlling which namespaces a query's keys should map against and in what preferred order. I think some ambiguity across different namespaces is inevitable (like:subject/ls:subjectin this case) and making the namespace precedence configurable (still TODO) and/or overridable per request could be useful when consolidating the old and the new API. If we for example only want to query the "pure" records, we could simply set['kbv']as the precedence order, i.e. "map my keys only to kbv terms".Keeping this as its own PR instead of adding even more to the base branch, since it's closely tied to libris/definitions#628.