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

See
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
http://www.lucenebootcamp.com
Next Training: April 7, 2008 at ApacheCon Europe in Amsterdam

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to