lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <>
Subject Re: indexing api wrt Analyzer
Date Thu, 13 Mar 2008 11:53:48 GMT
On IndexWriter, you can pass in the Analyzer when you add a Document,  
thus your application can identify the language, choose the analyzer  
for the given doc, and then add the document

public void addDocument(Document doc, Analyzer analyzer)

On Mar 12, 2008, at 8:40 PM, John Wang wrote:

> Hi all:
>    Maybe this has been asked before:
>    I am building an index consists of multiple languages, (stored as a
> field), and I have different analyzers depending on the language of  
> the
> language to be indexed. But the IndexWriter takes only an Analyzer.
>    I was hoping to have IndexWriter take an AnalyzerFactory, where the
> AnalyzerFactory produces Analyzer depending on some criteria of the
> document, e.g. language.
>    Maybe I am going about the wrong way.
>    Any suggestions on how to go about?
> Thanks
> -John

Grant Ingersoll
Next Training: April 7, 2008 at ApacheCon Europe in Amsterdam

Lucene Helpful Hints:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message