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 Mirko Sertic <mi...@web.de> on 2013/09/07 16:59:17 UTC

Strange performance of Lucene 4.4.0

Hi@all
 
I am getting strange performance measures on Lucene 4.4.0, maybe someone can explain this:
 
The following syntax leads to pretty slow queries on my machine(16ms for every execution):
 
theSearcher.search(theQuery, null, theSearcher.getIndexReader().maxDoc());
 
but the following syntax leads to an average execution time of 2ms:
 
theSearcher.search(theQuery, null, theSearcher.getIndexReader().maxDoc(), new Sort());
 
Just by providing an empty Sort() instance, which does not sort at all! The executed query is a simple TermQuery, the index contains about 2'000'000 documents. This is quite strange..
 
Thanks in advance
 
Mirko

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


Re: Strange performance of Lucene 4.4.0

Posted by Adrien Grand <jp...@gmail.com>.
Sort.INDEXORDER just lets you know about matching documents while by
default a score is computed and Lucene selects the top N matching
documents from your index.

On Mon, Sep 9, 2013 at 7:33 PM, Mirko Sertic <mi...@web.de> wrote:
> Ok, using Sort.INDEXORDER for default sorting is blazing fast. Just for my
> understanding, what is the difference between both methods? Is just
> unneccesary score computation the problem of the CPU peak?
>
> Thanks in advance
> Mirko
>
> Am 09.09.2013 13:43, schrieb Michael McCandless:
>
>> Sort.INDEXORDER, or, just make your own Collector, which should be
>> faster than INDEXORDER.
>>
>> Mike McCandless
>>
>> http://blog.mikemccandless.com
>>
>>
>> On Mon, Sep 9, 2013 at 7:19 AM, Mirko Sertic <mi...@web.de> wrote:
>>>
>>> Dear Mike
>>>
>>> I need an API to disable Scoring without any sorting.
>>>
>>> Unfortunately every method in IndexSearcher where i can say doDocScores
>>> also require a not-null Sort instance. So what would be the best way to
>>> disable scoring and have no sorting, and archiving the same performance as
>>> the "Empty Sort()" bug? I should probably use Sort.INDEXORDER for sorting,
>>> right? It gives me the same result...
>>>
>>> Thanks in advance
>>> Mirko
>>>
>>>
>>>
>>> Gesendet: Montag, 09. September 2013 um 13:03 Uhr
>>> Von: "Michael McCandless" <lu...@mikemccandless.com>
>>> An: "Lucene Users" <ja...@lucene.apache.org>
>>> Betreff: Re: Re: Re: Strange performance of Lucene 4.4.0
>>> If new Sort() fails to sort by score, that's a bug! Can you please
>>> open a Jira issue?
>>>
>>> Mike McCandless
>>>
>>> http://blog.mikemccandless.com
>>>
>>>
>>> On Mon, Sep 9, 2013 at 5:21 AM, Mirko Sertic <mi...@web.de> wrote:
>>>>
>>>> Hi
>>>>
>>>> Basically i am running a load test. For every run i executed about 1
>>>> million queries on the same index with the same query string, so it should
>>>> be warmed up very well ;-) It performs about 8x faster with an empty Sort()
>>>> instance than the first option. Still do not get it. An empty Sort instance
>>>> should sort by score, according to the default constructor.
>>>>
>>>> Providing no sort instance finally invokes
>>>>
>>>> protected TopDocs search(Weight weight, ScoreDoc after, int nDocs)
>>>> throws IOException
>>>>
>>>> while providing a Sort instance finally invokes
>>>>
>>>> protected TopFieldDocs search(Weight weight, FieldDoc after, int nDocs,
>>>> Sort sort, boolean fillFields,
>>>> boolean doDocScores, boolean doMaxScore) throws IOException
>>>>
>>>> with doDocScores and doMaxScore set to false.
>>>>
>>>> Seems like providing an empty Sort() instances should sort by score
>>>> according to its default constructor. But no scoring is done by the
>>>> IndexSearcher, so there is nothing so sort at all. So from this point of
>>>> view the scoring computation does cause the slower queries.
>>>>
>>>> Regards
>>>> Mirko
>>>>
>>>> Gesendet: Montag, 09. September 2013 um 09:55 Uhr
>>>> Von: "Toke Eskildsen" <te...@statsbiblioteket.dk>
>>>> An: "java-user@lucene.apache.org" <ja...@lucene.apache.org>
>>>> Betreff: Re: Aw: Re: Strange performance of Lucene 4.4.0
>>>> On Sun, 2013-09-08 at 15:15 +0200, Mirko Sertic wrote:
>>>>>
>>>>> I have to check, but my usecase does not require sorting or even
>>>>> scoring at all. I still do not get what the difference is...
>>>>
>>>> Please describe how you perform your measurements. How do you ensure
>>>> that the index is warmed equally for the two cases?
>>>>
>>>> - Toke
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>



-- 
Adrien

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


Re: Strange performance of Lucene 4.4.0

Posted by Mirko Sertic <mi...@web.de>.
Ok, using Sort.INDEXORDER for default sorting is blazing fast. Just for 
my understanding, what is the difference between both methods? Is just 
unneccesary score computation the problem of the CPU peak?

Thanks in advance
Mirko

Am 09.09.2013 13:43, schrieb Michael McCandless:
> Sort.INDEXORDER, or, just make your own Collector, which should be
> faster than INDEXORDER.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Mon, Sep 9, 2013 at 7:19 AM, Mirko Sertic <mi...@web.de> wrote:
>> Dear Mike
>>
>> I need an API to disable Scoring without any sorting.
>>
>> Unfortunately every method in IndexSearcher where i can say doDocScores also require a not-null Sort instance. So what would be the best way to disable scoring and have no sorting, and archiving the same performance as the "Empty Sort()" bug? I should probably use Sort.INDEXORDER for sorting, right? It gives me the same result...
>>
>> Thanks in advance
>> Mirko
>>
>>
>>
>> Gesendet: Montag, 09. September 2013 um 13:03 Uhr
>> Von: "Michael McCandless" <lu...@mikemccandless.com>
>> An: "Lucene Users" <ja...@lucene.apache.org>
>> Betreff: Re: Re: Re: Strange performance of Lucene 4.4.0
>> If new Sort() fails to sort by score, that's a bug! Can you please
>> open a Jira issue?
>>
>> Mike McCandless
>>
>> http://blog.mikemccandless.com
>>
>>
>> On Mon, Sep 9, 2013 at 5:21 AM, Mirko Sertic <mi...@web.de> wrote:
>>> Hi
>>>
>>> Basically i am running a load test. For every run i executed about 1 million queries on the same index with the same query string, so it should be warmed up very well ;-) It performs about 8x faster with an empty Sort() instance than the first option. Still do not get it. An empty Sort instance should sort by score, according to the default constructor.
>>>
>>> Providing no sort instance finally invokes
>>>
>>> protected TopDocs search(Weight weight, ScoreDoc after, int nDocs) throws IOException
>>>
>>> while providing a Sort instance finally invokes
>>>
>>> protected TopFieldDocs search(Weight weight, FieldDoc after, int nDocs,
>>> Sort sort, boolean fillFields,
>>> boolean doDocScores, boolean doMaxScore) throws IOException
>>>
>>> with doDocScores and doMaxScore set to false.
>>>
>>> Seems like providing an empty Sort() instances should sort by score according to its default constructor. But no scoring is done by the IndexSearcher, so there is nothing so sort at all. So from this point of view the scoring computation does cause the slower queries.
>>>
>>> Regards
>>> Mirko
>>>
>>> Gesendet: Montag, 09. September 2013 um 09:55 Uhr
>>> Von: "Toke Eskildsen" <te...@statsbiblioteket.dk>
>>> An: "java-user@lucene.apache.org" <ja...@lucene.apache.org>
>>> Betreff: Re: Aw: Re: Strange performance of Lucene 4.4.0
>>> On Sun, 2013-09-08 at 15:15 +0200, Mirko Sertic wrote:
>>>> I have to check, but my usecase does not require sorting or even
>>>> scoring at all. I still do not get what the difference is...
>>> Please describe how you perform your measurements. How do you ensure
>>> that the index is warmed equally for the two cases?
>>>
>>> - Toke
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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


Re: Re: Re: Re: Strange performance of Lucene 4.4.0

Posted by Michael McCandless <lu...@mikemccandless.com>.
Sort.INDEXORDER, or, just make your own Collector, which should be
faster than INDEXORDER.

Mike McCandless

http://blog.mikemccandless.com


On Mon, Sep 9, 2013 at 7:19 AM, Mirko Sertic <mi...@web.de> wrote:
> Dear Mike
>
> I need an API to disable Scoring without any sorting.
>
> Unfortunately every method in IndexSearcher where i can say doDocScores also require a not-null Sort instance. So what would be the best way to disable scoring and have no sorting, and archiving the same performance as the "Empty Sort()" bug? I should probably use Sort.INDEXORDER for sorting, right? It gives me the same result...
>
> Thanks in advance
> Mirko
>
>
>
> Gesendet: Montag, 09. September 2013 um 13:03 Uhr
> Von: "Michael McCandless" <lu...@mikemccandless.com>
> An: "Lucene Users" <ja...@lucene.apache.org>
> Betreff: Re: Re: Re: Strange performance of Lucene 4.4.0
> If new Sort() fails to sort by score, that's a bug! Can you please
> open a Jira issue?
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Mon, Sep 9, 2013 at 5:21 AM, Mirko Sertic <mi...@web.de> wrote:
>> Hi
>>
>> Basically i am running a load test. For every run i executed about 1 million queries on the same index with the same query string, so it should be warmed up very well ;-) It performs about 8x faster with an empty Sort() instance than the first option. Still do not get it. An empty Sort instance should sort by score, according to the default constructor.
>>
>> Providing no sort instance finally invokes
>>
>> protected TopDocs search(Weight weight, ScoreDoc after, int nDocs) throws IOException
>>
>> while providing a Sort instance finally invokes
>>
>> protected TopFieldDocs search(Weight weight, FieldDoc after, int nDocs,
>> Sort sort, boolean fillFields,
>> boolean doDocScores, boolean doMaxScore) throws IOException
>>
>> with doDocScores and doMaxScore set to false.
>>
>> Seems like providing an empty Sort() instances should sort by score according to its default constructor. But no scoring is done by the IndexSearcher, so there is nothing so sort at all. So from this point of view the scoring computation does cause the slower queries.
>>
>> Regards
>> Mirko
>>
>> Gesendet: Montag, 09. September 2013 um 09:55 Uhr
>> Von: "Toke Eskildsen" <te...@statsbiblioteket.dk>
>> An: "java-user@lucene.apache.org" <ja...@lucene.apache.org>
>> Betreff: Re: Aw: Re: Strange performance of Lucene 4.4.0
>> On Sun, 2013-09-08 at 15:15 +0200, Mirko Sertic wrote:
>>> I have to check, but my usecase does not require sorting or even
>>> scoring at all. I still do not get what the difference is...
>>
>> Please describe how you perform your measurements. How do you ensure
>> that the index is warmed equally for the two cases?
>>
>> - Toke
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

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


Aw: Re: Re: Re: Strange performance of Lucene 4.4.0

Posted by Mirko Sertic <mi...@web.de>.
Dear Mike

I need an API to disable Scoring without any sorting.

Unfortunately every method in IndexSearcher where i can say doDocScores also require a not-null Sort instance. So what would be the best way to disable scoring and have no sorting, and archiving the same performance as the "Empty Sort()" bug? I should probably use Sort.INDEXORDER for sorting, right? It gives me the same result...

Thanks in advance
Mirko
 
 

Gesendet: Montag, 09. September 2013 um 13:03 Uhr
Von: "Michael McCandless" <lu...@mikemccandless.com>
An: "Lucene Users" <ja...@lucene.apache.org>
Betreff: Re: Re: Re: Strange performance of Lucene 4.4.0
If new Sort() fails to sort by score, that's a bug! Can you please
open a Jira issue?

Mike McCandless

http://blog.mikemccandless.com


On Mon, Sep 9, 2013 at 5:21 AM, Mirko Sertic <mi...@web.de> wrote:
> Hi
>
> Basically i am running a load test. For every run i executed about 1 million queries on the same index with the same query string, so it should be warmed up very well ;-) It performs about 8x faster with an empty Sort() instance than the first option. Still do not get it. An empty Sort instance should sort by score, according to the default constructor.
>
> Providing no sort instance finally invokes
>
> protected TopDocs search(Weight weight, ScoreDoc after, int nDocs) throws IOException
>
> while providing a Sort instance finally invokes
>
> protected TopFieldDocs search(Weight weight, FieldDoc after, int nDocs,
> Sort sort, boolean fillFields,
> boolean doDocScores, boolean doMaxScore) throws IOException
>
> with doDocScores and doMaxScore set to false.
>
> Seems like providing an empty Sort() instances should sort by score according to its default constructor. But no scoring is done by the IndexSearcher, so there is nothing so sort at all. So from this point of view the scoring computation does cause the slower queries.
>
> Regards
> Mirko
>
> Gesendet: Montag, 09. September 2013 um 09:55 Uhr
> Von: "Toke Eskildsen" <te...@statsbiblioteket.dk>
> An: "java-user@lucene.apache.org" <ja...@lucene.apache.org>
> Betreff: Re: Aw: Re: Strange performance of Lucene 4.4.0
> On Sun, 2013-09-08 at 15:15 +0200, Mirko Sertic wrote:
>> I have to check, but my usecase does not require sorting or even
>> scoring at all. I still do not get what the difference is...
>
> Please describe how you perform your measurements. How do you ensure
> that the index is warmed equally for the two cases?
>
> - Toke
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

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

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


Re: Re: Re: Strange performance of Lucene 4.4.0

Posted by Michael McCandless <lu...@mikemccandless.com>.
If new Sort() fails to sort by score, that's a bug!  Can you please
open a Jira issue?

Mike McCandless

http://blog.mikemccandless.com


On Mon, Sep 9, 2013 at 5:21 AM, Mirko Sertic <mi...@web.de> wrote:
> Hi
>
> Basically i am running a load test. For every run i executed about 1 million queries on the same index with the same query string, so it should be warmed up very well ;-) It performs about 8x faster with an empty Sort() instance than the first option. Still do not get it. An empty Sort instance should sort by score, according to the default constructor.
>
> Providing no sort instance finally invokes
>
> protected TopDocs search(Weight weight, ScoreDoc after, int nDocs) throws IOException
>
> while providing a Sort instance finally invokes
>
> protected TopFieldDocs search(Weight weight, FieldDoc after, int nDocs,
>                                 Sort sort, boolean fillFields,
>                                 boolean doDocScores, boolean doMaxScore) throws IOException
>
> with doDocScores and doMaxScore set to false.
>
> Seems like providing an empty Sort() instances should sort by score according to its default constructor. But no scoring is done by the IndexSearcher, so there is nothing so sort at all. So from this point of view the scoring computation does cause the slower queries.
>
> Regards
> Mirko
>
> Gesendet: Montag, 09. September 2013 um 09:55 Uhr
> Von: "Toke Eskildsen" <te...@statsbiblioteket.dk>
> An: "java-user@lucene.apache.org" <ja...@lucene.apache.org>
> Betreff: Re: Aw: Re: Strange performance of Lucene 4.4.0
> On Sun, 2013-09-08 at 15:15 +0200, Mirko Sertic wrote:
>> I have to check, but my usecase does not require sorting or even
>> scoring at all. I still do not get what the difference is...
>
> Please describe how you perform your measurements. How do you ensure
> that the index is warmed equally for the two cases?
>
> - Toke
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

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


Aw: Re: Re: Strange performance of Lucene 4.4.0

Posted by Mirko Sertic <mi...@web.de>.
Hi

Basically i am running a load test. For every run i executed about 1 million queries on the same index with the same query string, so it should be warmed up very well ;-) It performs about 8x faster with an empty Sort() instance than the first option. Still do not get it. An empty Sort instance should sort by score, according to the default constructor.
 
Providing no sort instance finally invokes

protected TopDocs search(Weight weight, ScoreDoc after, int nDocs) throws IOException

while providing a Sort instance finally invokes

protected TopFieldDocs search(Weight weight, FieldDoc after, int nDocs,
                                Sort sort, boolean fillFields,
                                boolean doDocScores, boolean doMaxScore) throws IOException
 
with doDocScores and doMaxScore set to false.

Seems like providing an empty Sort() instances should sort by score according to its default constructor. But no scoring is done by the IndexSearcher, so there is nothing so sort at all. So from this point of view the scoring computation does cause the slower queries.

Regards
Mirko

Gesendet: Montag, 09. September 2013 um 09:55 Uhr
Von: "Toke Eskildsen" <te...@statsbiblioteket.dk>
An: "java-user@lucene.apache.org" <ja...@lucene.apache.org>
Betreff: Re: Aw: Re: Strange performance of Lucene 4.4.0
On Sun, 2013-09-08 at 15:15 +0200, Mirko Sertic wrote:
> I have to check, but my usecase does not require sorting or even
> scoring at all. I still do not get what the difference is...

Please describe how you perform your measurements. How do you ensure
that the index is warmed equally for the two cases?

- Toke


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

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


Re: Aw: Re: Strange performance of Lucene 4.4.0

Posted by Toke Eskildsen <te...@statsbiblioteket.dk>.
On Sun, 2013-09-08 at 15:15 +0200, Mirko Sertic wrote:
> I have to check, but my usecase does not require sorting or even
> scoring at all. I still do not get what the difference is...

Please describe how you perform your measurements. How do you ensure
that the index is warmed equally for the two cases?

- Toke


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


Aw: Re: Strange performance of Lucene 4.4.0

Posted by Mirko Sertic <mi...@web.de>.
HI

I have to check, but my usecase does not require sorting or even scoring at all. I still do not get what the difference is...

Regards
Mirko
 
 

Gesendet: Sonntag, 08. September 2013 um 12:21 Uhr
Von: "Roberto Ragusa" <ma...@robertoragusa.it>
An: java-user@lucene.apache.org
Betreff: Re: Strange performance of Lucene 4.4.0
On 09/07/2013 04:59 PM, Mirko Sertic wrote:
> Hi@all
>
> I am getting strange performance measures on Lucene 4.4.0, maybe someone can explain this:
>
> The following syntax leads to pretty slow queries on my machine(16ms for every execution):
>
> theSearcher.search(theQuery, null, theSearcher.getIndexReader().maxDoc());
>
> but the following syntax leads to an average execution time of 2ms:
>
> theSearcher.search(theQuery, null, theSearcher.getIndexReader().maxDoc(), new Sort());
>
> Just by providing an empty Sort() instance, which does not sort at all! The executed query is a simple TermQuery, the index contains about 2'000'000 documents. This is quite strange..
>

Are the results sorted in the first case? (maybe by ranking)

--
Roberto Ragusa mail at robertoragusa.it

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

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


Re: Strange performance of Lucene 4.4.0

Posted by Roberto Ragusa <ma...@robertoragusa.it>.
On 09/07/2013 04:59 PM, Mirko Sertic wrote:
> Hi@all
>  
> I am getting strange performance measures on Lucene 4.4.0, maybe someone can explain this:
>  
> The following syntax leads to pretty slow queries on my machine(16ms for every execution):
>  
> theSearcher.search(theQuery, null, theSearcher.getIndexReader().maxDoc());
>  
> but the following syntax leads to an average execution time of 2ms:
>  
> theSearcher.search(theQuery, null, theSearcher.getIndexReader().maxDoc(), new Sort());
>  
> Just by providing an empty Sort() instance, which does not sort at all! The executed query is a simple TermQuery, the index contains about 2'000'000 documents. This is quite strange..
>  

Are the results sorted in the first case? (maybe by ranking)

-- 
   Roberto Ragusa    mail at robertoragusa.it

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