Can I use it with multiple search terms then?
I tried with this where leonardo is in dbpedia-owl:starring and gangs is in
dbpprop:name, but it doesn't return any results.
SELECT DISTINCT ?s ?p ?o ?mscore
WHERE { ?s ?p ?o . ?s rdf:type dbpedia-owl:Film . FILTER( ?p in (
dbpedia-owl:starring, dbpprop:name ) ) . ?o bif:contains 'leonardo AND
gangs' option (score ?mscore) } ORDER BY DESC(?mscore)
Best,
Mats
On Fri, May 21, 2010 at 8:15 PM, Nathan <[email protected]> wrote:
> [email protected] wrote:
>
>> When using bif:contains in Virtuoso, from what I've seen, you an only
>> query
>> a single property. In many cases it's more useful to query multiple
>> properties, for example if you have a blog and want to do a single query
>> that searches through both author and title and perhaps even the contents
>> of
>> the blog posts. I have found a blog post with some details on using Solr
>> to
>> solve this problem [1].
>>
>
> it is easy :)
>
> SPARQL:
> SELECT DISTINCT ?s ?p ?o ?mscore WHERE {
> ?s ?p ?o .
> FILTER( ?p in ( list, of, properties ) ) .
> FILTER( lang(?o) = "en" ) .
> ?o bif:contains 'searchterm' option (score ?mscore)
> }
>
> I think that should do it, untested
>
> Best,
>
> Nathan
>