Marvin Lugair wrote:
Hi all!
This is more for the virtuoso folks but still cc-ing dbpedia.

Please give us some input if you can answer these questions:
I am trying text search in virtuos from isql against a locally loaded dbpedia.


*QUESTION ONE*
Why does bif:contains return faster than REGEX search, and why are they 
returning a different number of counted rows? The search string is not the real 
string but it does not change the question. Which should we use?
bif:contains uses Virtuoso's in-built Full Text Index engine. The indexes are based on the "Literal Objects" in Triples.
Regex isn't based on the Full Text indexes.

(1) searching with with regex

SQL>  sparql select count(*) where { ?s ?p ?o . FILTER regex(?o , "searchstring", 
"i")};
callret-0
INTEGER
_____________________________________________________________________________

4344
1 Rows. -- 3895755 msec.




(2) searching with bif:contains

SQL> sparql select count(*) where {?s ?p ?o. ?o bif:contains "searchstring"};
callret-0
INTEGER
_______________________________________________________________________________

20737
1 Rows. -- 208426 msec.






*Question 2*
Why can't I search a property or subject?

SQL> sparql select count(*) where {?s ?p ?o. ?p bif:contains "searchstring"};
*** Error 37000: [Virtuoso Driver][Virtuoso Server]SQ074: Line 1: SP031: SPARQL 
compiler: The group does not contain triple pattern with '$p' object before 
bif:contains() predicate
at line 1 of Top-Level:
 sparql select count(*) where {?s ?p ?o. ?p bif:contains "searchstring"}
A "Property" in a Triple is a URI not a literal.

Kingsley




THANKS!
Marv


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Dbpedia-discussion mailing list
dbpedia-discuss...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion



--


Regards,

Kingsley Idehen       Weblog: http://www.openlinksw.com/blog/~kidehen
President & CEO OpenLink Software Web: http://www.openlinksw.com





Reply via email to