lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Pillinger <ap...@dolby.co.uk>
Subject Problem with ConstantScoreRangeQuery
Date Mon, 29 Oct 2007 16:21:48 GMT
I am programatically creating a query as follows.

     BooleanQuery query = new BooleanQuery();
     ConstantScoreRangeQuery range = new ConstantScoreRangeQuery 
("creationDate", "19500101", "20071029", false, false);
     query.add(range, Occur.MUST);

I am then executing the query which unexpectedly returns no results.

If I take the toString() of the boolean query I get

+creationDate:{19500101 TO 20071029}

Executing this in luke against the exact same index returns results  
as I expect.


Does anyone know what I am doing wrong?


The reason I am using a BooleanQuery is that I want to add extra  
clauses to this query once it is working.

Thanks
Adrian

-----------------------------------------
This message (including any attachments) may contain confidential
information intended for a specific individual and purpose.  If you
are not the intended recipient, delete this message.  If you are
not the intended recipient, disclosing, copying, distributing, or
taking any action based on this message is strictly prohibited.

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