[ https://issues.apache.org/jira/browse/LUCENE-6365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14530470#comment-14530470 ]
Markus Heiden edited comment on LUCENE-6365 at 5/6/15 1:49 PM: --------------------------------------------------------------- Sorry for the delay. I moved Operations.getFiniteStrings() to TestOperations.getFiniteStrings(), because using the iterator for assertions is a pain. Production code using this method has been replaced by direct usage of the new iterator. I got one problem with that: I am not sure if the implementation change of CompletionTokenStream is OK, because I set the position attribute at the end of the iteration instead of at the start of the iteration. The tests run fine, but someone should review that. I marked the new iterator as @lucene.experimental and added a comment, that the iteration order may change. was (Author: markus_heiden): Sorry for the delay. I moved Operations.getFiniteStrings() to TestOperations.getFiniteStrings(), because using the iterator for assertions is a pain. Production code using this method has been replaced by direct usage of the new iterator. I got one problem with that: I am not sure if the implementation change of CompletionTokenStream is OK, because I set the position attribute at the end of the iteration instead of at the start of the iteration. The tests run fine, but someone better reviews that. I marked the new iterator as @lucene.experimental and added a comment, that the iteration order may change. > Optimized iteration of finite strings > ------------------------------------- > > Key: LUCENE-6365 > URL: https://issues.apache.org/jira/browse/LUCENE-6365 > Project: Lucene - Core > Issue Type: Improvement > Components: core/other > Affects Versions: 5.0 > Reporter: Markus Heiden > Priority: Minor > Labels: patch, performance > Attachments: FiniteStringsIterator.patch, FiniteStringsIterator2.patch > > > Replaced Operations.getFiniteStrings() by an optimized FiniteStringIterator. > Benefits: > Avoid huge hash set of finite strings. > Avoid massive object/array creation during processing. > "Downside": > Iteration order changed, so when iterating with a limit, the result may > differ slightly. Old: emit current node, if accept / recurse. New: recurse / > emit current node, if accept. > The old method Operations.getFiniteStrings() still exists, because it eases > the tests. It is now implemented by use of the new FiniteStringIterator. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org