Hi,

We're using queryparser to generate my queries (not ideal, and we're
planning on rewriting it, but at the moment we don't have the resources
to do so). 

We have a default field "text" which contains all of our text fields,
and a "date" field which is just a string field in the format YYYY-MM-DD
(so we can sort). 

I'm passing in the query string: broadband AND date:[2005-03-16 TO
2006-03-16]^0.01

(I'm weighting the date portion of the query so it doesn't affect the
sorting too heavily). 

Running query.toString gives this: +text:broadband +date:[2005-03-16 TO
2006-03-16]^0.01

When I try to run the query, though, I get this Exception:

        org.apache.lucene.search.BooleanQuery$TooManyClauses
        at
org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:79)
        at
org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:71)
        at
org.apache.lucene.search.RangeQuery.rewrite(RangeQuery.java:99)
        at
org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:243)
        at
org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:166)
        at org.apache.lucene.search.Query.weight(Query.java:84)
        at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:85)
        at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:64)
        at org.apache.lucene.search.Hits.<init>(Hits.java:43)
        at org.apache.lucene.search.Searcher.search(Searcher.java:33)
        at org.apache.lucene.search.Searcher.search(Searcher.java:27)

I know Lucene 1.4 has a limited number of clauses, but assumed two or
three would be okay. :)

Any ideas would be gratefully received! Oddly, this doesn't seem to
occur every time, just with certain date ranges...

Cheers,

Tim.
--------------------------------------------------------------------------------------------------------------------------------------------
The information contained in this email message may be confidential. If you are 
not the intended recipient, any use, interference with, disclosure or copying 
of this material is unauthorised and prohibited. Although this message and any 
attachments are believed to be free of viruses, no responsibility is accepted 
by Informa for any loss or damage arising in any way from receipt or use 
thereof.  Messages to and from the company are monitored for operational 
reasons and in accordance with lawful business practices. 
If you have received this message in error, please notify us by return and 
delete the message and any attachments.  Further enquiries/returns can be sent 
to [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to