Range Queries Performance Hit

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Range Queries Performance Hit

suman.holani
Hello,


Range queries are lowering down the performance of search.
I am using date in my clucene application .

lucene doc has these kind of fields:

startdt="1242758400" enddt="1241980500"



now when i am searching for
searchingdate = new RangeQuery(lastyear time in seconds,current time in
seconds, true);

searchingdate1 = new RangeQuery(current time in seconds,nextyear time in
seconds, true);

Query :i want all doc , created after last year and expired before next year.

but the query is taking 15ms to run.
if i remove the query the execution time is reduced to half.

1. any other thing that i can use for range queries
2. converting the time to minutes is also not helping me.

Help me with the solution.


Thanks,
Suman



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Range Queries Performance Hit

Uwe Schindler
You should use NumericRangeQuery and NumericField (since 2.9).

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: [hidden email]


> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: Thursday, March 25, 2010 12:08 PM
> To: [hidden email]
> Subject: Range Queries Performance Hit
>
> Hello,
>
>
> Range queries are lowering down the performance of search.
> I am using date in my clucene application .
>
> lucene doc has these kind of fields:
>
> startdt="1242758400" enddt="1241980500"
>
>
>
> now when i am searching for
> searchingdate = new RangeQuery(lastyear time in seconds,current time in
> seconds, true);
>
> searchingdate1 = new RangeQuery(current time in seconds,nextyear time
> in
> seconds, true);
>
> Query :i want all doc , created after last year and expired before next
> year.
>
> but the query is taking 15ms to run.
> if i remove the query the execution time is reduced to half.
>
> 1. any other thing that i can use for range queries
> 2. converting the time to minutes is also not helping me.
>
> Help me with the solution.
>
>
> Thanks,
> Suman
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Range Queries Performance Hit

suman.holani

U mean I need to use padding technique in indexing and searching in order
to make numeric searches rt?

for numbers 1...10
indexes should be  01 02....10
rather than 1 10 2.....9


thanks,
Suman


> You should use NumericRangeQuery and NumericField (since 2.9).
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: [hidden email]
>
>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]]
>> Sent: Thursday, March 25, 2010 12:08 PM
>> To: [hidden email]
>> Subject: Range Queries Performance Hit
>>
>> Hello,
>>
>>
>> Range queries are lowering down the performance of search.
>> I am using date in my clucene application .
>>
>> lucene doc has these kind of fields:
>>
>> startdt="1242758400" enddt="1241980500"
>>
>>
>>
>> now when i am searching for
>> searchingdate = new RangeQuery(lastyear time in seconds,current time in
>> seconds, true);
>>
>> searchingdate1 = new RangeQuery(current time in seconds,nextyear time
>> in
>> seconds, true);
>>
>> Query :i want all doc , created after last year and expired before next
>> year.
>>
>> but the query is taking 15ms to run.
>> if i remove the query the execution time is reduced to half.
>>
>> 1. any other thing that i can use for range queries
>> 2. converting the time to minutes is also not helping me.
>>
>> Help me with the solution.
>>
>>
>> Thanks,
>> Suman
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Range Queries Performance Hit

Ian Lea
No.  See java classes

org.apache.lucene.search.NumericRangeQuery
org.apache.lucene.document.NumericField

See also recent thread on this list with subject "Lucene 3.0 Search
Performance Stats".


--
Ian.


On Thu, Mar 25, 2010 at 11:53 AM,  <[hidden email]> wrote:

>
> U mean I need to use padding technique in indexing and searching in order
> to make numeric searches rt?
>
> for numbers 1...10
> indexes should be  01 02....10
> rather than 1 10 2.....9
>
>
> thanks,
> Suman
>
>
>> You should use NumericRangeQuery and NumericField (since 2.9).
>>
>> -----
>> Uwe Schindler
>> H.-H.-Meier-Allee 63, D-28213 Bremen
>> http://www.thetaphi.de
>> eMail: [hidden email]
>>
>>
>>> -----Original Message-----
>>> From: [hidden email] [mailto:[hidden email]]
>>> Sent: Thursday, March 25, 2010 12:08 PM
>>> To: [hidden email]
>>> Subject: Range Queries Performance Hit
>>>
>>> Hello,
>>>
>>>
>>> Range queries are lowering down the performance of search.
>>> I am using date in my clucene application .
>>>
>>> lucene doc has these kind of fields:
>>>
>>> startdt="1242758400" enddt="1241980500"
>>>
>>>
>>>
>>> now when i am searching for
>>> searchingdate = new RangeQuery(lastyear time in seconds,current time in
>>> seconds, true);
>>>
>>> searchingdate1 = new RangeQuery(current time in seconds,nextyear time
>>> in
>>> seconds, true);
>>>
>>> Query :i want all doc , created after last year and expired before next
>>> year.
>>>
>>> but the query is taking 15ms to run.
>>> if i remove the query the execution time is reduced to half.
>>>
>>> 1. any other thing that i can use for range queries
>>> 2. converting the time to minutes is also not helping me.
>>>
>>> Help me with the solution.
>>>
>>>
>>> Thanks,
>>> Suman
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Range Queries Performance Hit

suman.holani

Hi,

Is there something of this sort  provided in clucene as well..lucene for
c++ ???

thanks,
Suman

> No.  See java classes
>
> org.apache.lucene.search.NumericRangeQuery
> org.apache.lucene.document.NumericField
>
> See also recent thread on this list with subject "Lucene 3.0 Search
> Performance Stats".
>
>
> --
> Ian.
>
>
> On Thu, Mar 25, 2010 at 11:53 AM,  <[hidden email]> wrote:
>>
>> U mean I need to use padding technique in indexing and searching in
>> order
>> to make numeric searches rt?
>>
>> for numbers 1...10
>> indexes should be  01 02....10
>> rather than 1 10 2.....9
>>
>>
>> thanks,
>> Suman
>>
>>
>>> You should use NumericRangeQuery and NumericField (since 2.9).
>>>
>>> -----
>>> Uwe Schindler
>>> H.-H.-Meier-Allee 63, D-28213 Bremen
>>> http://www.thetaphi.de
>>> eMail: [hidden email]
>>>
>>>
>>>> -----Original Message-----
>>>> From: [hidden email] [mailto:[hidden email]]
>>>> Sent: Thursday, March 25, 2010 12:08 PM
>>>> To: [hidden email]
>>>> Subject: Range Queries Performance Hit
>>>>
>>>> Hello,
>>>>
>>>>
>>>> Range queries are lowering down the performance of search.
>>>> I am using date in my clucene application .
>>>>
>>>> lucene doc has these kind of fields:
>>>>
>>>> startdt="1242758400" enddt="1241980500"
>>>>
>>>>
>>>>
>>>> now when i am searching for
>>>> searchingdate = new RangeQuery(lastyear time in seconds,current time
>>>> in
>>>> seconds, true);
>>>>
>>>> searchingdate1 = new RangeQuery(current time in seconds,nextyear time
>>>> in
>>>> seconds, true);
>>>>
>>>> Query :i want all doc , created after last year and expired before
>>>> next
>>>> year.
>>>>
>>>> but the query is taking 15ms to run.
>>>> if i remove the query the execution time is reduced to half.
>>>>
>>>> 1. any other thing that i can use for range queries
>>>> 2. converting the time to minutes is also not helping me.
>>>>
>>>> Help me with the solution.
>>>>
>>>>
>>>> Thanks,
>>>> Suman
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Range Queries Performance Hit

Ian Lea
That question should be asked on the clucene list.  This is the
java-user lucene list.


--
Ian.


On Thu, Mar 25, 2010 at 12:19 PM,  <[hidden email]> wrote:

>
> Hi,
>
> Is there something of this sort  provided in clucene as well..lucene for
> c++ ???
>
> thanks,
> Suman
>
>> No.  See java classes
>>
>> org.apache.lucene.search.NumericRangeQuery
>> org.apache.lucene.document.NumericField
>>
>> See also recent thread on this list with subject "Lucene 3.0 Search
>> Performance Stats".
>>
>>
>> --
>> Ian.
>>
>>
>> On Thu, Mar 25, 2010 at 11:53 AM,  <[hidden email]> wrote:
>>>
>>> U mean I need to use padding technique in indexing and searching in
>>> order
>>> to make numeric searches rt?
>>>
>>> for numbers 1...10
>>> indexes should be  01 02....10
>>> rather than 1 10 2.....9
>>>
>>>
>>> thanks,
>>> Suman
>>>
>>>
>>>> You should use NumericRangeQuery and NumericField (since 2.9).
>>>>
>>>> -----
>>>> Uwe Schindler
>>>> H.-H.-Meier-Allee 63, D-28213 Bremen
>>>> http://www.thetaphi.de
>>>> eMail: [hidden email]
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: [hidden email] [mailto:[hidden email]]
>>>>> Sent: Thursday, March 25, 2010 12:08 PM
>>>>> To: [hidden email]
>>>>> Subject: Range Queries Performance Hit
>>>>>
>>>>> Hello,
>>>>>
>>>>>
>>>>> Range queries are lowering down the performance of search.
>>>>> I am using date in my clucene application .
>>>>>
>>>>> lucene doc has these kind of fields:
>>>>>
>>>>> startdt="1242758400" enddt="1241980500"
>>>>>
>>>>>
>>>>>
>>>>> now when i am searching for
>>>>> searchingdate = new RangeQuery(lastyear time in seconds,current time
>>>>> in
>>>>> seconds, true);
>>>>>
>>>>> searchingdate1 = new RangeQuery(current time in seconds,nextyear time
>>>>> in
>>>>> seconds, true);
>>>>>
>>>>> Query :i want all doc , created after last year and expired before
>>>>> next
>>>>> year.
>>>>>
>>>>> but the query is taking 15ms to run.
>>>>> if i remove the query the execution time is reduced to half.
>>>>>
>>>>> 1. any other thing that i can use for range queries
>>>>> 2. converting the time to minutes is also not helping me.
>>>>>
>>>>> Help me with the solution.
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Suman
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]