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 sandyg <ga...@gmail.com> on 2008/03/13 11:50:03 UTC
sorting a doc field takes more time
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
Re: sorting a doc field takes more time
Posted by Grant Ingersoll <gs...@apache.org>.
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
Re: sorting a doc field takes more time
Posted by sandyg <ga...@gmail.com>.
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 reults 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
Re: sorting a doc field takes more time
Posted by Grant Ingersoll <gs...@apache.org>.
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