lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Hill <>
Subject discontinuous range query
Date Wed, 04 Oct 2006 20:34:10 GMT
Hi -

I'm having a bit of trouble building a query to match a range of 
values in a field that is not continuous.

For an example, say I want to find all people with last names 
starting with A-C, and G-K.

If I use MUST on each element of the range, then I get nothing. This 
I think I understand, as if I require both A-C and G-K, no doc matches both.
+name:[A TO C] +name:[G TO K]

But if I make both clauses SHOULD, I get back all the documents in my 
small test index, not just the ones that match either.
name:[A TO C] name:[G TO K]

Actually, if I do either piece with SHOULD, I get all the documents 
in the index, MUST gives me only the ones I expect.

What does SHOULD really mean, precisely?

And how do I query a discontinuous range?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message