Feature/remodel instance vs work search#576
Merged
Conversation
This was referenced Mar 31, 2026
olovy
reviewed
Apr 17, 2026
olovy
added a commit
to libris/librisxl
that referenced
this pull request
Apr 17, 2026
Use new definitions in libris/definitions#576 to avoid hardcoding and unnecessary complexity in query expansion * Adjust search to align with remodelled work vs instance category terms * Exclude selectors incompatible with RDF subject types in agg query * Remove awkward integral relation cancellation * Adjust unit tests * Omit librissearch: prefix from query keys * Fix unit tests * Reintroduce noneCategory and refactor SelectedFacets * Restrict by value only when the value is a Resource * Fix immutable Map * Use constant --------- Co-authored-by: Olov Ylinenpää <olov.ylinenpaa@kb.se>
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.
instanceOf/hasInstanceshould be prepended in search can be inferred from the domain.ls:workCategorya composite property withls:findCategory,ls:identifyCategory, andls:noneCategoryas sub-properties. Previously, values outsidels:findCategoryandls:identifyCategorydefaulted tols:noneCategory. However, some use cases (e.g. free-text search within workCategory) require querying across all three.ls:findCategory/ls:identifyCategory/ls:noneCategoryby setting:category :coercing(should be straight-forward to add corresponding sub-properties ofls:instanceCategoryif/when needed)rdf:typeto the top ofsliceListso it will be overridden byworkType/instanceTypewhen those are applicable. (This doesn't work for mixed-type queries, e.g.type:Agent OR type:Instance, however mixed-type querying is already broken for other reasons so let's address that later.)Add initial test suite for new Libris Search lxl_api_tests#44 (tests only basic querying so e.g. aggregating needs manual testing)Add more tests for new search lxl_api_tests#45