cting the maxium/highest numerical value from a lucene
Index)
On 1/23/06, Chris Hostetter <[EMAIL PROTECTED]> wrote:
> use a TermEnum to iterate over all the values of the field,
> remembering the "previous" value each time untill you run out of
> values
Bummer that y
On 1/23/06, Chris Hostetter <[EMAIL PROTECTED]> wrote:
> use a TermEnum to iterate over all the values of the field, remembering
> the "previous" value each time untill you run out of values
Bummer that you can't step backwards with a TermEnum... finding the
first term is cheap, but finding the la
: What is the easist way to identify the maximum or highest primary key
: value in the lucene index?
The most straight forward way is to do a search for all documents, ordered
by the field you are interested in, and then get the value out of hte
first document.
Under the covers, sorting works us
I'm only a novice at these things but if I had to do that right now? I'd add
a document that represents that primary key with a value representing the
next available number and everytime I go to do some additions I'd get it,
use the value and then delete and re-add that document with the revised ne