lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Smith <john_smith9...@yahoo.com>
Subject Question related to using FieldCacheImpl
Date Thu, 06 Apr 2006 18:15:19 GMT
Hi
   
  I need to access min and max values of a particular field in the index, as soon as a searcher
is initialized. I don't need it later. Looking at old newsgroup mails, I found a few recommendations.
   
  One was to keep the min and max fields external to the index. But this will not work for
us. 
   
  Then there was the recommendation to use FieldCacheImpl, as sorting might be a little expensive.
Looking at FieldCacheImpl implementation, I had a couple of questions. Sorry if this has been
asked and answered before.
   
  If I use this method
   
   // inherit javadocs
  public String[] getStrings (IndexReader reader, String field)

  The string array I get back, is it guaranteed that the first non-null value I encounter
in the array is the minimum value for this field and iterating through the array in the reverse
order, the first non-null value I encounter is the max value for the field?
   
  Thank you
   
  JS
   
   
   

			
---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message