Skip to content
Snippets Groups Projects
Commit bbb2db3c authored by Mathieu Massaviol's avatar Mathieu Massaviol
Browse files

Improve getSearchResults query #68

parent 7239250f
Branches
No related tags found
1 merge request!79Resolve "Investiguer / Optimiser les temps de réponse des requêtes Virtuoso"
...@@ -153,29 +153,32 @@ export const getSearchResults = async (resourceUriList: string[], auth?: Credent ...@@ -153,29 +153,32 @@ export const getSearchResults = async (resourceUriList: string[], auth?: Credent
} }
WHERE { WHERE {
VALUES ?s { ${formattedUris} } VALUES ?s { ${formattedUris} }
VALUES ?p { GRAPH ?g {
rdf:type ?s dct:identifier ?identifier.
dct:title
dct:description VALUES ?p {
dcat:version rdf:type
dcat:catalog dct:title
dcat:dataset dct:description
dcat:distribution dcat:version
dcat:catalog
dcat:dataset
dcat:distribution
}
?s ?p ?o.
} }
?s ?p ?o.
OPTIONAL { OPTIONAL {
?s dct:creator ?creator. ?s dct:creator ?creator.
VALUES ?p2 { foaf:name foaf:givenName foaf:familyName foaf:firstName } VALUES ?p2 { foaf:name foaf:givenName foaf:familyName foaf:firstName }
?creator ?p2 ?o2. ?creator ?p2 ?o2.
} }
OPTIONAL { OPTIONAL {
?parentCatalog dcat:dataset|dcat:catalog ?s. VALUES ?parentLink { dcat:dataset dcat:catalog }
?parentCatalog a dcat:Catalog;
?parentLink ?s.
VALUES ?pparentCatalog { dct:identifier dct:title } VALUES ?pparentCatalog { dct:identifier dct:title }
?parentCatalog ?pparentCatalog ?oparentCatalog. ?parentCatalog ?pparentCatalog ?oparentCatalog.
} }
GRAPH ?g {
?s dct:identifier ?identifier.
}
} }
`, `,
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment