lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: sorting a doc field takes more time
Date Mon, 17 Mar 2008 12:09:29 GMT
Sorting is dependent on the values in the fields.  What is actually in  
the fields?  But, yes, in general, sorting is going to be slower than  
just raw search.  It's extra operations.  It also looks like you are  
using the AUTO SortField, which means you are relying on Lucene to  
figure out how to sort.  If you know what type field is (numeric,  
etc.) then you might try setting the type using the alternate  
SortField constructor.

On Mar 15, 2008, at 2:24 AM, sandyg wrote:

>
> HI,
> thnx for reply
> field ,documents ,sort and sort field all are lucene classes
> and after getting the results at the time of displaying am using  
> sort class
> to sort the results based on particular field
> the code for sorting
>              Query query = parser.parse(queryString);
>             Sort   sort = new Sort(new SortField(field));
>                Hits  hits = searcher.search(query,sort);
>
>
>
> Grant Ingersoll-6 wrote:
>>
>> What's in "field"?  What are your docs?  More info is needed to  
>> help...
>>
>> -Grant
>> On Mar 13, 2008, at 6:50 AM, sandyg wrote:
>>
>>>
>>> Hi,
>>>
>>> Thnxs for spending  time for the problem.
>>>
>>> When sorting the results of lucene search it takes more time and not
>>> looks
>>> not that much usefull can any one help
>>> Below is my code..
>>>
>>>               sort = new Sort(new SortField(field));
>>>               hits = searcher.search(query,sort);
>>>
>>> Once again thnx
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/sorting-a-doc-field-takes-more-time-tp16024551p16024551.html
>>> Sent from the Lucene - Java Users mailing list archive at  
>>> Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>
>> --------------------------
>> Grant Ingersoll
>> http://www.lucenebootcamp.com
>> Next Training: April 7, 2008 at ApacheCon Europe in Amsterdam
>>
>> Lucene Helpful Hints:
>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/sorting-a-doc-field-takes-more-time-tp16024551p16064453.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

--------------------------
Grant Ingersoll
http://www.lucenebootcamp.com
Next Training: April 7, 2008 at ApacheCon Europe in Amsterdam

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ






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