You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Chris Fraschetti <fr...@gmail.com> on 2005/07/29 22:40:30 UTC
indexed document id
I've got an index which I rebuild each time and don't do any deletes
until the end, so doc ids shouldn't change... at index time, is there
a better way to discover the id of the document i just added than
docCount() ?
--
___________________________________________________
Chris Fraschetti
e fraschetti@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: indexed document id
Posted by Otis Gospodnetic <ot...@yahoo.com>.
I believe so. Java's synchronized' keyword is what makes it possible to
use multiple threads with a single IndexWriter instance, and I believe
that means threads are processed in a FIFO manner.
Otis
--- Chris Fraschetti <fr...@gmail.com> wrote:
> If i'm using multiple threads to add documents to the index, can it
> be
> assumed that they will be added to the index in the order they are
> presented to the indexwriter? and thus keeping my local doc id count
> would hold true?
>
> -Chris Fraschetti
>
> On 7/29/05, Erik Hatcher <er...@ehatchersolutions.com> wrote:
> >
> > On Jul 29, 2005, at 4:40 PM, Chris Fraschetti wrote:
> > > I've got an index which I rebuild each time and don't do any
> deletes
> > > until the end, so doc ids shouldn't change... at index time, is
> there
> > > a better way to discover the id of the document i just added than
> > > docCount() ?
> >
> > When building a new index by strictly adding documents, you could
> > keep a zero-based counter which would reflect document id at that
> > time. They are simply in ascending order.
> >
> > Erik
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
>
>
> --
> ___________________________________________________
> Chris Fraschetti
> e fraschetti@gmail.com
>
> ---------------------------------------------------------------------
> 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
Re: indexed document id
Posted by Chris Fraschetti <fr...@gmail.com>.
If i'm using multiple threads to add documents to the index, can it be
assumed that they will be added to the index in the order they are
presented to the indexwriter? and thus keeping my local doc id count
would hold true?
-Chris Fraschetti
On 7/29/05, Erik Hatcher <er...@ehatchersolutions.com> wrote:
>
> On Jul 29, 2005, at 4:40 PM, Chris Fraschetti wrote:
> > I've got an index which I rebuild each time and don't do any deletes
> > until the end, so doc ids shouldn't change... at index time, is there
> > a better way to discover the id of the document i just added than
> > docCount() ?
>
> When building a new index by strictly adding documents, you could
> keep a zero-based counter which would reflect document id at that
> time. They are simply in ascending order.
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
--
___________________________________________________
Chris Fraschetti
e fraschetti@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: indexed document id
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 29, 2005, at 4:40 PM, Chris Fraschetti wrote:
> I've got an index which I rebuild each time and don't do any deletes
> until the end, so doc ids shouldn't change... at index time, is there
> a better way to discover the id of the document i just added than
> docCount() ?
When building a new index by strictly adding documents, you could
keep a zero-based counter which would reflect document id at that
time. They are simply in ascending order.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org