On Dec 13, 2004, at 11:16 PM, Karthik N S wrote:
time [ A simple search of 'handbags' returned 1,60,000 hits and time taken
was 440 secs ,in production Env / May be our
Coding is poor,But we are constantly improving the process ].

If your searches are taking 440 seconds, you have something more fundamentally wrong. You are either doing some large wildcard/range/fuzzy expansions or you're accessing every document from all your hits. Is the searcher.search() method taking that long? I bet not. Or rather is it the iteration over the Hits that is killing the "search" time, which is what I suspect?


We've emphasized numerous times that calling hits.doc(i) is a resource hit. Don't do it for documents you aren't going to show. To filter by score, use hits.score(i) first.

 { O/s Linux Gentoo , RAM 1GB, Lucene1.4.1,Appserver = Tomcat5, and
BlackDawn Java 1.4.2 with Args  -XX:+UseParallelGC for

Garbage Collection }

Please narrow your code down to a clean, succinct example that you can post. It is difficult to help you without details of your code (but let me emphasize again - it needs to be clean and succinct so it is quick for us to get a handle on).


 To be One step in advance ,We also have an adjecent Fields 'Vendor
','Price' which we have to accordingly Compare
 Best/Poor/Least results . So We have to have to limit the hits
accordingly,since Lucene API does not provide any way to
 inject this limiting facility *prior* to getting the hits .

Ah, so you are accessing every document to get this field information. It is incorrect that you cannot filter prior to getting hits. You have a couple of options in filtering by a field value - use a QueryFilter or simply AND a RangeQuery to the original query.


        Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to