Thank you Andy for your previously reply.

My doubts born for example in this query


SELECT DISTINCT ?s

WHERE

{

*?s text:query (dbpprop:type 'Daily newspaper')* .

?s dbpprop:type ?v1 .

*FILTER ( REGEX(STR(?v1), "Daily newspaper" , "i") )*
}


Lucene indexes work together (one Lucene query) or not?

Thanks again

--
Andrea.


2013/10/5 Andy Seaborne <[email protected]>

> On 05/10/13 08:45, Andrea Dessi wrote:
>
>> Hi,
>>
>> I've got jena-text working to do Lucene indexing, and I'd like to know the
>> technical differences  between text:query and filter regex.
>>
>> Thanks for any help,
>>
>> Andrea
>>
>>
> Hi Andrea,
>
> I'm not sure what aspect you mean but
>
> text:query is a property function - it looks like part of the basic graph
> pattern and it can generate answers, binding variables.  A filter can not
> do that - all it can do is take a stream of possibilities and accept or
> reject them.  Optimizers may do magic things in certain cases but, in
> general, it is a case of generating all possibilities which may may be a
> huge amount of work, and reducing it to a few results.  That's why FILTER
> regex can be very expensive.
>
> The lucene (or Solr) index used by text:query only generate the possible
> matches because, being an index, the Lucene engine looks up the query
> string (or some part of) to find a moderate number of possibilites. There
> is no "get everything and reduce" effect.
>
>         Andy
>
>


-- 
Andrea Dessi

Reply via email to