You can try to load the fieldcache:

if you get the StringIndex from the fieldcache, the last element in
the lookup array is the largest value (lexically) in the field.

-John


On 6/7/05, sergiu gordea <[EMAIL PROTECTED]> wrote:
> 
> 
> Kevin Burton wrote:
> 
> > I have an index with a date field.  I want to quickly find the minimum
> > and maximum values in the index.
> >
> > Is there a quick way to do this?  I looked at using TermInfos and
> > finding the first one but how to I find the last?
> >
> > I also tried the new sort API and the performance was horrible :-/
> >
> > Any ideas?
> 
> You may keep a history of the MIN and MAX values in an external file.
> Let's say, you can write in a text file the MIN_DATE and MAX_DATE,
> and keep them up to date when indexing, deleting documents.
> 
> Best,
> 
>  Sergiu
> 
> >
> > Kevin
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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

Reply via email to