You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Steven Parkes <st...@esseff.org> on 2007/06/01 00:33:22 UTC
RE: addIndexes()
Hmmm ... something's not meshing for me here.
If I understood what you've said, you have a DbD index to which you are
addIndexes'ing a memory index? I must have missed something, because
addIndexes pre- and post-optimizes the target (Dbd) index, not the
operand (mem) index.
-----Original Message-----
From: Andi Vajda [mailto:vajda@osafoundation.org]
Sent: Thursday, May 31, 2007 10:10 AM
To: java-dev@lucene.apache.org
Subject: Re: addIndexes()
On Thu, 31 May 2007, Doug Cutting wrote:
> Steven Parkes wrote:
>> Is there any particular reason that the version that takes a
Directory[]
>> optimizes first?
>
> There was, but unfortunately I can't recall it now. Index merging has
> changed substantially since then, so, whatever it was, it may no
longer
> apply. If no one can think of a good reason to optimize any longer,
then
> probably we should remove it, no?
No longer optimizing on this call would impact performance in what I'm
doing.
My usage pattern involves indexing in a MemoryIndex and adding that
index to
an index backed by a DbDirectory. If the index is not optimized first,
the
operation becomes very noisy in the database.
In other words, if that change is made, please let us know so that I can
adapt
my code to explicitely optimize the MemoryIndex first.
Thanks !
Andi..
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
RE: addIndexes()
Posted by Andi Vajda <va...@osafoundation.org>.
On Thu, 31 May 2007, Steven Parkes wrote:
> Hmmm ... something's not meshing for me here.
>
> If I understood what you've said, you have a DbD index to which you are
> addIndexes'ing a memory index? I must have missed something, because
> addIndexes pre- and post-optimizes the target (Dbd) index, not the
> operand (mem) index.
I stand corrected. I'm using an IndexWriter opened on a RAMDirectory to do the
indexing for a given transaction. Then I call addIndexes([writer]) on the
IndexWriter backed by the DbDirectory to persist this. This approach ash
turned out to be considerably faster and less noisy in the database (the
amount of random access changes) than indexing into the DbDirectory backed
index directly and then optimizing it.
The docs for addIndexes() say "After this completes, the index is optimized."
I mistakenly thought that there was discussion here about making this no
longer be the case.
Andi..
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org