[
https://issues.apache.org/jira/browse/LUCENE-3415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13097857#comment-13097857
]
Simon Willnauer commented on LUCENE-3415:
-----------------------------------------
instead of modifying snowball filter you could write a filter that buffers the
term and emits it twice. First you simply pass on the term and the second time
you set KeywordAttribute#setKeyword(boolean) to true. This will force the
stemmer to ignore this term an pass it along the tokenstream pipeline without
modification. Would that solve your problem? I am not sure we should actually
provide such a filter but others have more insight into this, robert?
> Snowball filter to include original word too
> --------------------------------------------
>
> Key: LUCENE-3415
> URL: https://issues.apache.org/jira/browse/LUCENE-3415
> Project: Lucene - Java
> Issue Type: Improvement
> Components: modules/analysis
> Affects Versions: 3.3
> Environment: All
> Reporter: Manish
> Labels: features
> Fix For: 3.4, 4.0
>
>
> 1. Currently, snowball filter deletes the original word and adds the stemmed
> word to the index. So, if i want to do search with / without stemming, i have
> to keep 2 fields, one with stemming and one without it.
> 2. Rather than doing this, if we have configurable item to preserve original,
> it would solve more business problem.
> 3. Using single field, i can do search using stemming / without stemming by
> changing the query filters.
> The same can also be done for phonetic filters too.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]