Hello,

I am playing with the text:query property function. 
The following query searches for var ?a where must meet 2 criteria, one related 
to predicate pred:cv-name, the other one to predicate pred:cv-synonym. 

PREFIX pred: <http://nextprot.org/rdf/pred/>
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
PREFIX fn: <http://www.w3.org/2005/xpath-functions#>
PREFIX text: <http://jena.apache.org/text#>
SELECT *
where {
?a text:query(pred:cv-name 'ubl' 5) .     <== first criterion
?a text:query(pred:cv-synonym 'ubiquitin' 10) .   <== second criterion
?a pred:cv-name ?n .
?a pred:cv-synonym ?d .
}

When I trace the solr index calls, here is what I see:

657968 [qtp1936269821-15] INFO  org.apache.solr.core.SolrCore  ? [rdf1] 
webapp=/solr path=/select params={q=cv_name:ubl&wt=javabin&version=2&rows=5} 
hits=172 status=0 QTime=1 
657972 [qtp1936269821-15] INFO  org.apache.solr.core.SolrCore  ? [rdf1] 
webapp=/solr path=/select 
params={q=cv_synonym:ubiquitin&wt=javabin&version=2&rows=10000} hits=256 
status=0 QTime=1 
657977 [qtp1936269821-15] INFO  org.apache.solr.core.SolrCore  ? [rdf1] 
webapp=/solr path=/select 
params={q=cv_synonym:ubiquitin&wt=javabin&version=2&rows=10000} hits=256 
status=0 QTime=1 
657982 [qtp1936269821-15] INFO  org.apache.solr.core.SolrCore  ? [rdf1] 
webapp=/solr path=/select 
params={q=cv_synonym:ubiquitin&wt=javabin&version=2&rows=10000} hits=256 
status=0 QTime=2 
657986 [qtp1936269821-15] INFO  org.apache.solr.core.SolrCore  ? [rdf1] 
webapp=/solr path=/select 
params={q=cv_synonym:ubiquitin&wt=javabin&version=2&rows=10000} hits=256 
status=0 QTime=1 
657991 [qtp1936269821-15] INFO  org.apache.solr.core.SolrCore  ? [rdf1] 
webapp=/solr path=/select 
params={q=cv_synonym:ubiquitin&wt=javabin&version=2&rows=10000} hits=256 
status=0 QTime=1 

It seems that the search related to the second criterion is called once for 
each solution found for first criterion.
Is my interpretation correct ? is there a workaround to compute mutiple 
text:query and do a single binding to var ?a ?

Thanky in advance for your answer,
Pierre-André

  

Reply via email to