Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 26459172CA for ; Wed, 6 May 2015 13:50:01 +0000 (UTC) Received: (qmail 45272 invoked by uid 500); 6 May 2015 13:50:00 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 45197 invoked by uid 500); 6 May 2015 13:50:00 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 45155 invoked by uid 99); 6 May 2015 13:50:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2015 13:50:00 +0000 Date: Wed, 6 May 2015 13:50:00 +0000 (UTC) From: "Markus Heiden (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (LUCENE-6365) Optimized iteration of finite strings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org