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

Please consider the environment before printing this email.

This message should be regarded as confidential. If you have received this 
email in error please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard copy by 
an authorised signatory.  The contents of this email may relate to dealings 
with other companies within the Detica Limited group of companies.

Detica Limited is registered in England under No: 1337451.

Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.

Reply via email to