lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neeraj shah <neerajsha...@gmail.com>
Subject Re: how to fetch qyery feild + other feild related results in Lucene3.6
Date Mon, 24 Jun 2013 09:01:44 GMT
so how can i solve this and reduce time?


On Mon, Jun 24, 2013 at 2:21 PM, Roberto Ragusa <mail@robertoragusa.it>wrote:

> On 06/24/2013 08:38 AM, neeraj shah wrote:
> > My hit size is 127674 and even if i comment the remedy fetching code (
> the
> > second search in for loop) still its taking very long time.
> > This is the code which im using without Remedy fetching code :
> >
> >
> >            for(int k=0;k<arrScoreDoc.length;k++){
> >              Document doc = searcher.doc(arrScoreDoc[k].doc);
> >              String remrid = doc.get("remrid");
> >
> >                 SearchHit o = new SearchHit();
> >                 String contents = doc.get("contents");
> >                 String section = doc.get("section");
> >
> >                 o.setContents(contents.replaceAll("/", " ; "));
> >                 o.setSection(section);
> >                 o.setRemrid(remrid);
> >
> >
> >            }
>
> You are doing 3 doc.get per result; those 400,000 calls are killing you.
> Do you see disk activity or is it entirely cached?
> What operating system are you running on?
>
>
> --
>    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
>
>


-- 
With Regards,
Neeraj Kumar Shah
+919819474146

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