lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <trej...@trypticon.org>
Subject Re: Possible to use span queries to avoid stepping over null index positions
Date Sat, 27 Aug 2011 13:59:18 GMT
On Sat, Aug 27, 2011 at 2:30 AM,  <ikoelliker@daegis.com> wrote:
> Hello,
> In our indexes we have a field that is a combination of other various metadata fields
(i.e. subject, from, to, etc.). Each field that is added has a null position at the beginning.
As an example, in Luke the field data looks like:
>
> null_1 this is a test subject null_1 ikoelliker email address
>
> If someone searches this field using a NEAR or WITHIN style query for "subject email"~10.
This message will be found. Is it possible to use Span Queries to avoid stepping over null
position?

Seems like you could:

    span-not(
      span-near(
        span-term(subject)
        span-term(email)
        10 ),
      span-term(null_1))

This is similar to tricks I have seen to return span matches in the
same sentence.

TX

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message