New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api-v2): Allow querying for rdfs:label in Gravsearch #1649
Conversation
I am looking forward to searching for labels! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I tried searching for various BEOL resources with refs:label, works like a charm.
Question: Now that we can query for refs:label like any other text value, do we still need to keep the separate route searchbylabel?
Thanks for the review!
If I remember correctly, that route is mainly for populating a GUI text box representing a resource IRI in the advanced search widget, so the user can type “Euler” and get Euler’s IRI to use in the advanced search. I guess having a route for this is simpler than making a Gravsearch query, and keeping it means we don’t have to change existing client code. |
Maybe you could use Gravsearch internally at some point, and the client would still communicate with the same route. I think we cannot restrict by project yet in Gravsearch: HTTP GET to http://host/v2/searchbylabel/searchValue[limitToResourceClass=resourceClassIRI] |
User story: https://dasch.myjetbrains.com/youtrack/issue/DSP-271
OntologyConstants.ResourceMetadataPropertyAxioms
specifying the object type ofrdfs:label
, so the type inspection mechanism knows it (by reading it inIntermediateTypeInspectionResult.newInstance
).AbstractPrequeryGenerator
so it doesn't generate any extra statements for a variable that is the object ofrdfs:label
.knora-api:matchLabel
function toAbstractPrequeryGenerator
, so you can do Lucene full-text searches in labels.InferringGravsearchTypeInspector
, infer that the first argument ofknora-api:matchLabel
is a resource.regex
function withrdfs:label
inAbstractPrequeryGenerator
.GravsearchTypeInspectorSpec
for type inspectionNonTriplestoreSpecificGravsearchToPrequeryTransformerSpec
for generating the prequerySearchRouteV2R2RSpec
for searching for a resource by label:FILTER
in the simple schemaFILTER
in the complex schemaknora-api:matchLabel
in the simple schemaknora-api:matchLabel
in the complex schemaregex
in the simple schemaregex
in the complex schemaquery-language.md
).