[ https://issues.apache.org/jira/browse/LUCENE-1794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741334#action_12741334 ]
Robert Muir commented on LUCENE-1794: ------------------------------------- {quote} Robert - wouldn't it make sense to pull SavedStreams (maybe call it ReusableStreams?) up to Analyzer, and have all the extensions use it? I couldn't help but notice that this code is duplicated in all the Analyzers. {quote} Shai, it would be great if somehow this could be factored. its not complete duplication: different things need to happen here: for example Thai and Smart Chinese have filters that keep state and require a reset(). But i don't know, seems like it could be factored into Analyzer and reset() called on both tokenizer and filters... I am trying to imagine a situation where refactoring this kind of thing would prevent some flexibility, but i think if tokenstreams keep state in some wierd way they should implement reset() for this purpose. {quote} Also, and I don't know if it's a matter for a different issue - the fact that reusableTokenStream accepts a field name is misleading. {quote} probably to support PerFieldAnalyzerWrapper is my first thought. how would PerFieldAnalyzerWrapper work correctly if field is not supplied??? > implement reusableTokenStream for all contrib analyzers > ------------------------------------------------------- > > Key: LUCENE-1794 > URL: https://issues.apache.org/jira/browse/LUCENE-1794 > Project: Lucene - Java > Issue Type: Improvement > Components: contrib/analyzers > Reporter: Robert Muir > Assignee: Robert Muir > Priority: Minor > Fix For: 2.9 > > Attachments: LUCENE-1794.patch, LUCENE-1794.patch > > > most contrib analyzers do not have an impl for reusableTokenStream > regardless of how expensive the back compat reflection is for indexing speed, > I think we should do this to mitigate any performance costs. hey, overall it > might even be an improvement! > the back compat code for non-final analyzers is already in place so this is > easy money in my opinion. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org