[
https://issues.apache.org/jira/browse/LUCENE-3508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Uwe Schindler updated LUCENE-3508:
----------------------------------
Attachment: LUCENE-3508.patch
One more time the filter was revisited and partly rewritten:
- it no longer clones the orginal token, as decompounding is done when
TokenStream is on this token, which does not change. The decompounder simply
takes termAtt/offsetAtt and produces new CompoundToken instances out of it,
added to the LinkedList. The original is returned unmodified by a simple
"return true". This filter actually only creates new opjects when compounds are
found, all other tokens are passed as is.
- CompoundToken is now a simple wrapper around the characters and the offsets,
copied out of the unmodified original termAtt.
I think thats the most effective implementation of this filters. I think it's
ready to commit.
> Decompounders based on CompoundWordTokenFilterBase cannot be used with custom
> attributes
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-3508
> URL: https://issues.apache.org/jira/browse/LUCENE-3508
> Project: Lucene - Java
> Issue Type: Bug
> Components: modules/analysis
> Affects Versions: 3.4, 4.0
> Reporter: Spyros Kapnissis
> Assignee: Uwe Schindler
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3508.patch, LUCENE-3508.patch, LUCENE-3508.patch,
> LUCENE-3508.patch
>
>
> The CompoundWordTokenFilterBase.setToken method will call clearAttributes()
> and then will reset only the default Token attributes (term, position, flags,
> etc) resulting in any custom attributes losing their value. Commenting out
> clearAttributes() seems to do the trick, but will fail the
> TestCompoundWordTokenFilter tests..
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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]