RDFLib / prez

Prez is a data-configurable Linked Data API framework that delivers profiles of Knowledge Graph data according to the Content Negotiation by Profile standard.
BSD 3-Clause "New" or "Revised" License
22 stars 9 forks source link

Extend default search predicates #282

Open leskneebone opened 7 hours ago

leskneebone commented 7 hours ago

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.

recalcitrantsupplant commented 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?

leskneebone commented 6 hours ago

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?

recalcitrantsupplant commented 5 hours ago

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.