lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto Ragusa <m...@robertoragusa.it>
Subject Re: how to fetch qyery feild + other feild related results in Lucene3.6
Date Mon, 24 Jun 2013 08:51:59 GMT
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


Mime
View raw message