lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Riccardo Daviddi <rdavi...@gmail.com>
Subject Re: Add unique id to a doc
Date Thu, 21 Jul 2005 20:30:47 GMT
yes I was wondering if I could "use" lucene before the db.
What you mean with GUID? About the digest, well it's a possibility but
considering I have to store my docs in a db I think the best is abort
this and first of all store in db the doc and assign the key as unique
id in the index.

On 7/21/05, Erik Hatcher <erik@ehatchersolutions.com> wrote:
> 
> On Jul 21, 2005, at 3:43 PM, Riccardo Daviddi wrote:
> > What I want to to is to assign a unique id to each doc I add to the
> > index.
> > I was wondering if there is a method to assign a unique id directly
> > looking in the index so after I could store my doc in a db with the
> > same id as key.
> 
> So first Lucene, then the DB?
> 
> How about generating a GUID for each document?  Or perhaps a digest
> of it's contents?
> 
>      Erik
> 
> 
> 
> >
> > On 7/21/05, Erik Hatcher <erik@ehatchersolutions.com> wrote:
> >
> >> 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: java-user-unsubscribe@lucene.apache.org
> >>> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>
> >>
> >>
> >
> >
> > --
> > Riccardo Daviddi
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 


-- 
Riccardo Daviddi

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message