Fastest Method for Searching (need all results)

2006-07-21 Thread Ryan O'Hara
My index contains approximately 5 millions documents. During a search, I need to grab the value of a field for every document in the result set. I am currently using a HitCollector to search. Below is my code: searcher.search(query, new HitCollector(){ public void

Re: Fastest Method for Searching (need all results)

2006-07-21 Thread Otis Gospodnetic
org Sent: Friday, July 21, 2006 2:43:41 PM Subject: Fastest Method for Searching (need all results) My index contains approximately 5 millions documents. During a search, I need to grab the value of a field for every document in the result set. I am currently using a HitCollector to search

Re: Fastest Method for Searching (need all results)

2006-07-21 Thread Mark Miller
Ryan O'Hara wrote: My index contains approximately 5 millions documents. During a search, I need to grab the value of a field for every document in the result set. I am currently using a HitCollector to search. Below is my code: searcher.search(query, new HitCollector(){

Re: Fastest Method for Searching (need all results)

2006-07-21 Thread Ryan O'Hara
Perhaps I am speaking too quickly, but I would try by not grabbing the value of the field for every document in the results set. Someone will see that value or use it for a couple million hits? Could be I suppose...but if not than axe it. Grab the first few thousand (or MUCH less) and if th

Re: Fastest Method for Searching (need all results)

2006-07-21 Thread Mark Miller
Provides a new api, IndexReader.document(int doc, String[] fields). A document containing only the specified fields is created. The other fields of the document are not loaded, although unfortunately uncompressed strings still have to be scanned because the length information in the index is

Re: Fastest Method for Searching (need all results)

2006-07-21 Thread Ryan O'Hara
I haven't had the chance to use this new feature yet, but have you tried with selective field loading, so that you can load only that 1 field from your index and not all of them? I have not tried selective field loading, but it sounds like a good idea. What class is it in? Any more inform

Re: Fastest Method for Searching (need all results)

2006-07-21 Thread eks dev
8:43:41 PM Subject: Fastest Method for Searching (need all results) My index contains approximately 5 millions documents. During a search, I need to grab the value of a field for every document in the result set. I am currently using a HitCollector to search. Below is my code: searcher.search

Re: Fastest Method for Searching (need all results)

2006-08-02 Thread Ryan O'Hara
eks dev, The most best way of looping through all results that I have come across is using a HitCollector and grabbing the field values via FieldCache. This is under two conditions: 1) The FieldCache arrays are initialized only once, since creating these arrays creates serious overhead,