Skip to content

Feature/remodel instance vs work search#576

Merged
olovy merged 8 commits intodevelopfrom
feature/remodel-instance-vs-work-search
Apr 17, 2026
Merged

Feature/remodel instance vs work search#576
olovy merged 8 commits intodevelopfrom
feature/remodel-instance-vs-work-search

Conversation

@kwahlin
Copy link
Copy Markdown
Contributor

@kwahlin kwahlin commented Mar 31, 2026

  • Control instance vs. work search term behavior via domain/range rather than via property chain axioms (makes much more sense in my opinion). Whether instanceOf/hasInstance should be prepended in search can be inferred from the domain.
  • Make ls:workCategory a composite property with ls:findCategory, ls:identifyCategory, and ls:noneCategory as sub-properties. Previously, values outside ls:findCategory and ls:identifyCategory defaulted to ls:noneCategory. However, some use cases (e.g. free-text search within workCategory) require querying across all three.
  • Demonstrate behavior for ls:findCategory /ls:identifyCategory/ls:noneCategory by setting :category :coercing (should be straight-forward to add corresponding sub-properties of ls:instanceCategory if/when needed)
  • Show workCategory and instanceCategory as separate incoming relations (format/kategori): 77061eb
  • Move rdf:type to the top of sliceList so it will be overridden by workType/instanceType when 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.)
  • Related changes in librisxl: Feature/instance vs work search librisxl#1736
  • Related changes in lxlviewer: Handle changed instance/work search terms lxlviewer#1541 (already merged and then reverted (cd741cc, needs re-revert)
  • New API tests include these terms: 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

Comment thread source/apps.jsonld Outdated
Copy link
Copy Markdown
Contributor

@olovy olovy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@olovy olovy merged commit 1827d26 into develop Apr 17, 2026
@olovy olovy deleted the feature/remodel-instance-vs-work-search branch April 17, 2026 14:10
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>
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.

2 participants