lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asgeir Frimannsson" <asge...@gmail.com>
Subject Re: indexing api wrt Analyzer
Date Thu, 13 Mar 2008 04:21:19 GMT
On Thu, Mar 13, 2008 at 10:40 AM, John Wang <john.wang@gmail.com> 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?
>

Perhaps this is what you are searching for:

http://lucene.apache.org/java/2_3_0/api/org/apache/lucene/analysis/PerFieldAnalyzerWrapper.html

With PerFieldAnalyzerWrapper, you can specify which analyzer to use with
each field, as well as a default analyzer.

cheers,
asgeir

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message