Hi Ivan,
i'll try this.
My whole query would be like:
/Select ?title ?label
v
Where
{?s dc:title ?title;
dc:created ?created./
//
/?dbpedia rdfs:label ?label
FILTER (bif:strcontains (?title, ?label))/
/?dbpedia foaf:name ?name
}
ORDER BY DESC (?created)
LIMIT 5/
(+ more or less further propertys)
I've got a bunch of triples using a few po: and dc: propertys like dc:title.
Now i want to compare every resource (dc:title) with the dbpedia set ...
mean all resources using rdfs:label.
Exact match or part string should be included. Same as you would type in
the title in the search bar of the main wikipedia page.
Concerning your graph proposal.
Setting up the labels_en.nt (labels dataset from dbpedia 3.6) into a
separate (named) graph and then query this graph only?
Best regards,
Robert
On 10.06.2011 10:34, Ivan Mikhailov wrote:
On Fri, 2011-06-10 at 02:10 +0200, Robbet wrote:
Hi Ivan,
thank you! Looks gut ...
First one seems to work as a Sparql query.
"syntax error at bif:strstr before ("
FILTER ( BOUND(bif:strstr (?label, ?title) )
But it works without the BOUND keyword.
I'm sorry, there should be bif:isnotnull() instead of BOUND() there.
I'm new to Virtuoso and SQL / SPARQL environment and try to compare
small buch of triples with a dc:title property with the rdfs:label property
from the whole dbpedia dataset stored locally. How do i can increase
search performance?
It takes lot of time (about 5-10 minutes each) at the moment altough it
runs on a quad core, 4gb, ssd system.
The dbpedia dataset is loaded into one graph.
In the meantime I already run the RDF_OBJ ADD rule with (null, null,
'ALL') to enable free text seach index.
I consider there is a way to index the rdfs label property only (no need
to search each dbpedia property or concept) in any way but dunno how.
There's no need in indexing labels only or titles only.
If you have something like "select all pairs of titles and labels such
that the title contains the label", and it's
?s dc:title ?title ; rdfs:label ?label
FILTER (bif:strcontains (?title, ?label))
then indexes on O will not help, strcontains can not use indexes. The
only minor acceleration you can provide is to specify graph if possible
(as FROM<const> or GRAPH<const> {...} or at least GRAPH ?g { ... } ).
If it's something else then please provide the whole query.
Best Regards,
Ivan Mikhailov
OpenLink Software
http://virtuoso.openlinksw.com