You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Christopher Condit <co...@sdsc.edu> on 2011/04/05 00:31:13 UTC

Field Aware TokenFilter

I need to add synonyms to an index depending on the field being indexed.
I know that TokenFilter is not "field aware", but is there a good way to
get at the field or do I need to add something to allow my Analyzer to
tell the TokenFilter which field is currently being examined?

Thanks,
-Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Field Aware TokenFilter

Posted by Ian Lea <ia...@gmail.com>.
Can you use PerFieldAnalyzerWrapper?  That would be the normal way to
approach this, specifying a different, synonym aware, analyzer for the
relevant field(s).

--
Ian.


On Mon, Apr 4, 2011 at 11:31 PM, Christopher Condit <co...@sdsc.edu> wrote:
> I need to add synonyms to an index depending on the field being indexed.
> I know that TokenFilter is not "field aware", but is there a good way to
> get at the field or do I need to add something to allow my Analyzer to
> tell the TokenFilter which field is currently being examined?
>
> Thanks,
> -Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org