Open leskneebone opened 7 hours ago
I wonder if we provide a query parameter where you can specify the search predicates so you can when running a query? In a UI you could then select whichever predicates you want (and set whatever defaults in the UI).
Would people always want to include alt/hidden labels in the search?
Alt/hidden labels pretty much exist to improve search. In my opinion they are as essential as the prefLabel.
But I like the idea of a parameter because there could be other cases that are less clear cut. For example, schema:description / dcterms:description. Depending on the catalogue, these may improve search results, or they might just create noise and false positives. That might not be a good default, but would be good to have as an option (I'm thinking an option for an admin user, not an end user). What kind of user would use such a parameter?
OK sounds best if we add them in with the defaults and also add an option to specify which one to use.
So this would be, including full text search:
This would also allow UIs to define other defaults; the UI can always pass through an alternate set of predicates to use for search.
Default search predicates are mentioned here:
https://github.com/RDFLib/prez/tree/v4.1.0?tab=readme-ov-file#language-and-search-configuration
default_search_predicates
rdfs:label skos:prefLabel sdo:name dcterms:title
Suggest extending the defaults to include additional textual labels used in vocabularies:
skos:altLabel skos:hiddenLabel
These properties capture the synonyms (semantic variants, but also including alternate spellings, acronyms etc) and are key to connecting user search terminology with resource language.