You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Karthik N S <ka...@controlnet.co.in> on 2004/12/16 10:07:25 UTC

NUMERIC RANGE BOOLEAN

Hi Guys

Apologies.............




Can some body Please Tell me Why is this Happening and any work around for
the same .???


Constructed String : +bags +itemPrice:[00000003 TO 00000020]

Query String: +contents:bags +itemPrice:[00000003 TO 00000020]

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)







      WITH WARM REGARDS
      HAVE A NICE DAY
      [ N.S.KARTHIK]




---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


RE: NUMERIC RANGE BOOLEAN

Posted by Karthik N S <ka...@controlnet.co.in>.
Hi Erik

Apologies..........


  Sometimes  I find it hard to understnad the Answer u  reply ....



   1) I looked at the the Wiki and similarly padded '0' [ Total Length = 8 ]
at the time of indexing

    so before Indexprocess the values will be   $ 10.25 , $ 0.50 ,$
15.50.....

    After padding and indexing finally [ Used Luke to moniter ] the values
were 00000010.25 ,00000000.25,00000015.50


  2) I did not find the RangeFilter API in Lucene1.4.3 [is it recently added
if so How Do I use the same some code snippets
     please ]




with regards
Karthik



-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
Sent: Thursday, December 16, 2004 6:55 PM
To: Lucene Users List
Subject: Re: NUMERIC RANGE BOOLEAN


On Dec 16, 2004, at 7:17 AM, Karthik N S wrote:
> We have to get the All the Hits int the Range ,
>
>    So  0.99 cents IS & ALWAYS be 0.99 cents  on which we do the price
> Comaprison from consumer point of view .
>
>
> I hope  I have answered u'r Question


No, in fact, you have not.  If you want to continue to receive my help
here, you need to provide *details*.  You pose often ambiguous and hard
to decipher questions.  Please help us help you by answering the
questions we ask precisely.  What are the values (exact string values)
in that field?  Please also read the wiki page on indexing numeric
values.

Look at using the new RangeFilter rather than a RangeQuery due to the
noted issues with doing a RangeQuery.

	Erik


>
>
> With regards
> Karthik
>
> -----Original Message-----
> From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
> Sent: Thursday, December 16, 2004 5:24 PM
> To: Lucene Users List
> Subject: Re: NUMERIC RANGE BOOLEAN
>
>
> On Dec 16, 2004, at 5:03 AM, Morus Walter wrote:
>> Erik Hatcher writes:
>>
>>> TooManyClauses exception occurs when a query such as a RangeQuery
>>> expands to more than 1024 terms.  I don't see how this could be the
>>> case in the query you provided - are you certain that is the query
>>> that
>>> generated the error?
>>>
>> Why not: the terms might be 00000003 00000003.1 00000003.11 ...
>>
>> So the question is, how do his terms look like...
>
> Ah, good point! So, Karthik - what are are the values of those terms?
>
> Pragmatically, do you really need to do a range involving the cents of
> a price?
>
> 	Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: NUMERIC RANGE BOOLEAN

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Dec 16, 2004, at 7:17 AM, Karthik N S wrote:
> We have to get the All the Hits int the Range ,
>
>    So  0.99 cents IS & ALWAYS be 0.99 cents  on which we do the price
> Comaprison from consumer point of view .
>
>
> I hope  I have answered u'r Question


No, in fact, you have not.  If you want to continue to receive my help 
here, you need to provide *details*.  You pose often ambiguous and hard 
to decipher questions.  Please help us help you by answering the 
questions we ask precisely.  What are the values (exact string values) 
in that field?  Please also read the wiki page on indexing numeric 
values.

Look at using the new RangeFilter rather than a RangeQuery due to the 
noted issues with doing a RangeQuery.

	Erik


>
>
> With regards
> Karthik
>
> -----Original Message-----
> From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
> Sent: Thursday, December 16, 2004 5:24 PM
> To: Lucene Users List
> Subject: Re: NUMERIC RANGE BOOLEAN
>
>
> On Dec 16, 2004, at 5:03 AM, Morus Walter wrote:
>> Erik Hatcher writes:
>>
>>> TooManyClauses exception occurs when a query such as a RangeQuery
>>> expands to more than 1024 terms.  I don't see how this could be the
>>> case in the query you provided - are you certain that is the query
>>> that
>>> generated the error?
>>>
>> Why not: the terms might be 00000003 00000003.1 00000003.11 ...
>>
>> So the question is, how do his terms look like...
>
> Ah, good point! So, Karthik - what are are the values of those terms?
>
> Pragmatically, do you really need to do a range involving the cents of
> a price?
>
> 	Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


RE: NUMERIC RANGE BOOLEAN

Posted by Karthik N S <ka...@controlnet.co.in>.
Hi Erik


Apologies.............


Yes As I told u in the X-mail

We have to get the All the Hits int the Range ,

   So  0.99 cents IS & ALWAYS be 0.99 cents  on which we do the price
Comaprison from consumer point of view .


I hope  I have answered u'r Question


With regards
Karthik

-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
Sent: Thursday, December 16, 2004 5:24 PM
To: Lucene Users List
Subject: Re: NUMERIC RANGE BOOLEAN


On Dec 16, 2004, at 5:03 AM, Morus Walter wrote:
> Erik Hatcher writes:
>
>> TooManyClauses exception occurs when a query such as a RangeQuery
>> expands to more than 1024 terms.  I don't see how this could be the
>> case in the query you provided - are you certain that is the query
>> that
>> generated the error?
>>
> Why not: the terms might be 00000003 00000003.1 00000003.11 ...
>
> So the question is, how do his terms look like...

Ah, good point! So, Karthik - what are are the values of those terms?

Pragmatically, do you really need to do a range involving the cents of
a price?

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: NUMERIC RANGE BOOLEAN

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Dec 16, 2004, at 5:03 AM, Morus Walter wrote:
> Erik Hatcher writes:
>
>> TooManyClauses exception occurs when a query such as a RangeQuery
>> expands to more than 1024 terms.  I don't see how this could be the
>> case in the query you provided - are you certain that is the query 
>> that
>> generated the error?
>>
> Why not: the terms might be 00000003 00000003.1 00000003.11 ...
>
> So the question is, how do his terms look like...

Ah, good point! So, Karthik - what are are the values of those terms?

Pragmatically, do you really need to do a range involving the cents of 
a price?

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: NUMERIC RANGE BOOLEAN

Posted by Morus Walter <mo...@tanto.de>.
Erik Hatcher writes:

> TooManyClauses exception occurs when a query such as a RangeQuery 
> expands to more than 1024 terms.  I don't see how this could be the 
> case in the query you provided - are you certain that is the query that 
> generated the error?
> 
Why not: the terms might be 00000003 00000003.1 00000003.11 ...

So the question is, how do his terms look like...

Morus

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


RE: NUMERIC RANGE BOOLEAN

Posted by Karthik N S <ka...@controlnet.co.in>.
Hi Erik

Yes this is Happening in our case

and we are using Lucene1.4.3 with same Sys config from my Ex mail....


With regards
Karthik

-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
Sent: Thursday, December 16, 2004 3:17 PM
To: Lucene Users List
Subject: Re: NUMERIC RANGE BOOLEAN


On Dec 16, 2004, at 4:07 AM, Karthik N S wrote:
> Can some body Please Tell me Why is this Happening and any work around 
> for
> the same .???
>
>
> Constructed String : +bags +itemPrice:[00000003 TO 00000020]
>
> Query String: +contents:bags +itemPrice:[00000003 TO 00000020]
>
> org.apache.lucene.search.BooleanQuery$TooManyClauses

TooManyClauses exception occurs when a query such as a RangeQuery 
expands to more than 1024 terms.  I don't see how this could be the 
case in the query you provided - are you certain that is the query that 
generated the error?

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: NUMERIC RANGE BOOLEAN

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Dec 16, 2004, at 4:07 AM, Karthik N S wrote:
> Can some body Please Tell me Why is this Happening and any work around 
> for
> the same .???
>
>
> Constructed String : +bags +itemPrice:[00000003 TO 00000020]
>
> Query String: +contents:bags +itemPrice:[00000003 TO 00000020]
>
> org.apache.lucene.search.BooleanQuery$TooManyClauses

TooManyClauses exception occurs when a query such as a RangeQuery 
expands to more than 1024 terms.  I don't see how this could be the 
case in the query you provided - are you certain that is the query that 
generated the error?

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org