Alexander Sidorov wrote:
Hello!

Does bif:contains support relevance? Can I order query results according to bif:contains?

Regards,
Alexander

As per prior post (last week):

## Full Text Score
## Entity Rank
## Surfaced via SPARQL

SELECT ?s ?sc  ( <LONG::IRI_RANK> (?s) ) as ?Rank
WHERE { ?s ?p ?o . ?o bif:contains 'NEW AND YOR' option (score ?sc). }
ORDER BY  desc (?sc)


Also note this sequence from Nathan which highlights a little bug:

Hi Guys,

Quick bug report:
37000 Error SP031: SPARQL compiler: Internal error:
sparp_find_triple_of_var_or_retval(): triple not found for strong match

SPARQL query:
define sql:signal-void-variables 1 define input:default-graph-uri
<http://dbpedia.org> SELECT * WHERE
{
  ?s ?p ?o . FILTER( lang(?o) = "en" ) . ?o bif:contains '"xmpp"'
option(score ?attributeScore)
  OPTIONAL { ?s rdfs:label ?flabel }
  OPTIONAL { ?s <http://dbpedia.org/property/abstract> ?fabstract }
}

to replicate include option(score ?score) to any bif:contains query then
add 2 or more OPTIONAL { } sections to the query, works fine with one.

Many Regards,

Nathan



workaround:

SELECT * WHERE
{
 { ?s ?p ?o . FILTER( lang(?o) = "en" ) . ?o bif:contains '"xmpp"'
option(score ?attributeScore) }
 OPTIONAL { ?s rdfs:label ?flabel }
 OPTIONAL { ?s <http://dbpedia.org/property/abstract> ?fabstract }
}

note the additional {} prior to optional statements


Kingsley

regards!


------------------------------------------------------------------------

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
------------------------------------------------------------------------

_______________________________________________
Virtuoso-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


--

Regards,

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





Reply via email to