gu-gridh / queerlit-gui

Web frontend for Queerlit search
MIT License
0 stars 0 forks source link

Optionally search works by central (non-peripheral) terms only #29

Closed arildm closed 10 months ago

arildm commented 2 years ago

For when a user is only interested in books that have X as a major theme, not as a minor theme.

arildm commented 2 years ago

We will be indexing main terms in the main record, and minor-significance terms in the beståndpost.

When the user selects terms X and Y, the API query should have filters for X and Y in the main record subject field as well as in the beståndspost subject field:

or-instanceOf.subject.@id=A
or-instanceOf.subject.@id=B
or-(path to beståndspost subject).@id=A
or-(path to beståndspost subject).@id=B

We could render minor-significance terms differently (smaller? lighter background color?). We could also provide a checkbox near the term input to disable searching by minor-significance terms. When selected, that would remove the latter filters from the query above.

However, I'm not sure if it is possible to filter by the beståndspost subject field in the current XL API.

arildm commented 10 months ago

Unfortunately, the API does not support such boolean queries as (major=X OR minor=X) AND (major=Y OR minor=Y). The best we can do is to force the user to choose major/minor for each term. Thus, the interface now has one input field for central terms and one for peripheral.

At KB they understand the need, which is also coming from other institutions, and they are looking to implement the central/peripheral distinction formally. In that, they may be able to enable more versatile "centrality" filtering like this.