I was just thinking about doing something similar, but after looking at
your code I thought couldn't the same thing be done by manipulating the
mergeFactor on the existing IndexWriter? It already indexes n documents
into memory before writing a new disk segment. I just looked at it again
but I can't see without a detailed study whether the mergeFactor applies
to merging from RAM to disk only or for merging on-disk segments as
well. If it applies to both, perhaps we could add a different field to
the IndexWriter to allow the two values to be different? Am I missing
something?
Dmitry.
>
> Subject:
> batch indexing
> From:
> Hal�csy P�ter <[EMAIL PROTECTED]>
> Date:
> Tue, 6 Aug 2002 23:19:43 +0200
> To:
> "Lucene Users List" <[EMAIL PROTECTED]>
>
>
>Hello everybody,
>there were a lot of discussion about batch indexing. I've attached a BatchIndexWriter
>class that can speed up the indexing. I haven't tested (release early release often).
>
>Unfortunatly one has to modify lucene code to use it: add two methods to
>IndexWriter.java
>
> /** Sets the analyzer which the text will be analyzed with.
> */
> public synchronized void setAnalyzer(Analyzer a) {
> this.analyzer = a;
> }
>
> /** Returns the analyzer that is used to analyzer the text.
> */
> public synchronized Analyzer getAnalyzer() {
> return analyzer;
> }
>
>
>Developers! Couldn't you add these methods in the cvs? they're very helpful if one
>wants to make a wrapper or decorator class.
>
>peter
>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>