lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: how to increase the performance!!!
Date Mon, 26 Nov 2007 16:21:32 GMT
Do all your docs match your query? in which case iterating over the Hits
object is very inefficient (see the docs Grant points you to).

Erick

On Nov 26, 2007 10:04 AM, Shakti_Sareen <Shakti_Sareen@satyam.com> wrote:

> Hi all,
>
> The size of the folder where I am keeping the index files is 160 MB
>
> containing 3277 documents.
>
> That's not too much. If you are doing things right, search should not
> take much time.
>
>
>
>
>
> Below is the code :
>
> String sNumber = null;
>
> hits = searcher.search(query);
>
> for (int i = 0;i < hits.length();i++) {
>
>  doc = hits.doc(i);
>
>  sdocNumber = doc.get("NUMBER");
>
>  if (sNumber.equalsIgnoreCase(sdocNumber)) {
>
>    LOGGER.info("Match found - " + sdocNumber);
>
>    }
>
> }
>
>
>
>
>
> Can anyone help???
>
>
>
> Regards
>
> Shakti Sareen
>
>
>
>
>
> DISCLAIMER:
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
> distribution or forwarding of any or all of the contents in this message is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message