Hi Tom, The query you want is name:[A TO C] name:[G TO K] (each clause being SHOULD, or put another way, an implicit "OR" in between.
The problem may be how you analyze the name field... is it tokenized at all? If so, you might be matching on first, last, and middle names, and the combination of everything may match most of your documents. -Yonik http://incubator.apache.org/solr Solr, the open-source Lucene search server On 10/4/06, Tom Hill <[EMAIL PROTECTED]> wrote:
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? Thanks, Tom
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]