lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "German Kondolf" <german.kond...@gmail.com>
Subject Re: Time of processing hits.doc()
Date Mon, 19 Nov 2007 10:43:38 GMT
You sould never use the hits for other use than retrieving a group of
results (usually a page of 10-20-30 docs).

You could see Apache Solr's implementation of faceted search.
I've use that code as a guide to group & count diferent facets (or
conditions, fields as you wanna call it), is pretty fast, and you have
endless optimization approaches.

Regards,
German K.

On Nov 18, 2007 6:32 PM, Haroldo Nascimento <haroldo.araras@gmail.com> wrote:
> I have a problem of performance when I need group the result do search
>
> I have the code below:
>
>    for (int i = 0; i < hits.length(); i++) {
>                     doc = hits.doc(i);
>
>                     obj1 = doc.get(Constants.STATE_DESC_FIELD_LABEL);
>                     obj2 = doc.get(xxx);
>                     ...
>    }
>
>   I work with volume of data very big. The search process in 0.300
> seconds but when the object hits have much results, the time for get
> all objects is very big. The command hits.doc(i) is processed in 2
> second.
>
>   Por exemplo. For hits.length() equals the 25.000 results, the time
> of "pos search" is 7 seconds.
>
>   I get all result because I need group the result (remove the
> duplicate results).
>
>   Is there any form in Lucene that group the result. I need of
> anything as the command "group by" of sql.
>
>   Thanks.
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message