diff options
author | Munyoki Kilyungi | 2023-10-24 16:24:04 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-10-27 13:45:32 +0300 |
commit | 5e6cd1933a97eb8a5903c3617d03885e91b2124a (patch) | |
tree | 6d4f50891072fc8ebd1b22330a3942bc14d6faef /gn3 | |
parent | 6554132088fac2621c3723ec431e591403335f08 (diff) | |
download | genenetwork3-5e6cd1933a97eb8a5903c3617d03885e91b2124a.tar.gz |
Use virtuoso's full text search when searching datasets.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/api/metadata.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gn3/api/metadata.py b/gn3/api/metadata.py index ce0b9c4..91e0b24 100644 --- a/gn3/api/metadata.py +++ b/gn3/api/metadata.py @@ -232,17 +232,18 @@ CONSTRUCT { rdfs:label ?label ; dct:title ?title ; ex:belongsToInbredSet ?inbredSetName ; - xkos:classifiedUnder ?datasetType + xkos:classifiedUnder ?datasetType ; ] } WHERE { { SELECT ?dataset ?label ?inbredSetName ?datasetType ?title WHERE { ?dataset rdf:type dcat:Dataset ; rdfs:label ?label ; + ?datasetPredicate ?datasetObject ; xkos:classifiedUnder ?inbredSet . ?inbredSet ^skos:member gnc:Set ; rdfs:label ?inbredSetName . - ?label bif:contains "'$term'" . + ?datasetObject bif:contains "'$term'" . OPTIONAL { ?dataset dct:title ?title . } . @@ -258,8 +259,8 @@ CONSTRUCT { { SELECT (COUNT(*)/$limit+1 AS ?totalCount) WHERE { ?dataset rdf:type dcat:Dataset ; - rdfs:label ?label . - ?label bif:contains "'$term'" . + ?p ?o . + ?o bif:contains "'$term'" . } } |