Hello Vanessa,

An integer 1950 or date 1950-01-01 are not texts, so they're not in
free-text index and thus invisible for CONTAINS free-text predicate.

A possible way to make them visible that way is to introduce an
additional RDF predicate that will contain objects of the "interesting"
triples converted to strings via str() function.

OTOH the "opposite" approach would promise better results: if searches
about dates are frequent then a new predicate can have date/datetime
values extracted from texts, eliminating the need for bif:contains

Best Regards,

Ivan Mikhailov
OpenLink Software
http://virtuoso.openlinksw.com

On Thu, 2011-02-24 at 13:16 +0000, Vanessa Lopez wrote:
> Hi all!
> 
> I wonder how can I get an exact mapping for the literal "1950" using  
> the following sparql query with bif:contains:
> 
> WHY I CAN'T GET THE EXACT MAPPINGS FOR "1950"
> SELECT DISTINCT ?s ?o FROM <http://dbpedia.org> WHERE {?s ?p ? 
> o.FILTER( <bif:contains>(?o, '"1950"') && isLiteral(?o) && ( str(?p) ! 
> = rdfs:label  || str(?p) !=  foaf:name && ( ?o='1950')
>   ))}
> 
> I get 1950's, 1950-1952, 1950-present, etc
> 
> But I don't get "1950" as for example in the instance:
> http://dbpedia.org/page/Zumtobel_Lighting_Group  (dbprop:foundation  
> 1950 (xsd:integer))
> 
> Many thanks!!!
> Vanessa 
> 



Reply via email to