You could certainly use IndexReader to get the last document in the index and retrieve its ID, but why?

What use case do you have in mind for such id's? Do they have a non- arbitrary meaning? Do your documents have nothing unique to identify them already?

    Erik


On Jul 21, 2005, at 11:53 AM, Riccardo Daviddi wrote:

Hi all,

it's possible to set an unique id (as keyword field) to a doc by
looking in the index? I mean, it's possible to look in the index and
know what is the last id (which is a keyword field) and then decide
for the new id to associate to the new indexed doc? Or it's better
store the doc in a db and get so a unique id (the key of the row in
the db) and use it as the unique id for the keyword field in the
index?

--
Riccardo Daviddi

---------------------------------------------------------------------
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