lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@lucene.com>
Subject Re: batch indexing
Date Tue, 06 Aug 2002 21:35:56 GMT
Halácsy Péter wrote:
> Unfortunatly one has to modify lucene code to use it: add two methods to IndexWriter.java
>   public synchronized void setAnalyzer(Analyzer a) {
>       this.analyzer = a;
>   }
>   public synchronized Analyzer getAnalyzer() {
>       return analyzer;
>   }

I can see the case for getAnalyzer(), but setAnalyzer() could be dangerous.

In any case, all that you invoke in your code is getAnalyzer(), and, 
actually, you could use null instead where you call it, since the only 
IndexWriter method that uses the analyzer is addDocument, and you never 
invoke addDocument() on "realWriter".

So no change to IndexWriter is required, but I would also not object to 
the addition of a getAnalyzer() method, especially if someone can come 
up with a use for it!

Doug


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message