lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: SpanNearQuery with repeated term?
Date Fri, 01 Apr 2011 11:09:57 GMT
I can't reproduce this using lucene-core-3.0.3.jar.  You don't say
what version you are using.  Why don't you post the smallest possible
complete standalone program or test case that demonstrates the
problem.  And tell us what version of lucene you are working with.
Always.


--
Ian.


On Fri, Apr 1, 2011 at 11:30 AM, Gregory Tarr <Gregory.tarr@detica.com> wrote:
> I am having some issues with SpanNearQuery:
>
> SpanQuery[] clauses = new SpanTermQuery[2];
> Clauses[0] = new SpanTermQuery("text","aaaa");
> Clauses[1] = new SpanTermQuery("text","bbbb");
> SpanNearQuery q = new SpanNearQuery(clauses,0,true); // returns 1
> document with "aaaa bbbb" in it
>
> SpanQuery[] clauses = new SpanTermQuery[2];
> Clauses[0] = new SpanTermQuery("text","aaaa");
> Clauses[1] = new SpanTermQuery("text","aaaa");
> SpanNearQuery q = new SpanNearQuery(clauses,0,true); // returns 2
> documents ( "aaaa bbbb" and "aaaa aaaa")
>
> This second bit of code returns the document with "aaaa bbbb" in it,
> Why doesn't SpanNearQuery discard that one and only return me the one
> I've asked for?
>
> Thanks
>
> Greg
>

---------------------------------------------------------------------
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