Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 23664 invoked from network); 30 Mar 2010 10:00:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Mar 2010 10:00:52 -0000 Received: (qmail 72374 invoked by uid 500); 30 Mar 2010 10:00:52 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 71887 invoked by uid 500); 30 Mar 2010 10:00:49 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 71880 invoked by uid 99); 30 Mar 2010 10:00:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Mar 2010 10:00:48 +0000 X-ASF-Spam-Status: No, hits=-1172.2 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Mar 2010 10:00:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C4CC1234C4B6 for ; Tue, 30 Mar 2010 10:00:27 +0000 (UTC) Message-ID: <223098963.575901269943227805.JavaMail.jira@brutus.apache.org> Date: Tue, 30 Mar 2010 10:00:27 +0000 (UTC) From: "Robert Muir (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-2351) optimize automatonquery In-Reply-To: <1304857111.528501269705867304.JavaMail.jira@brutus.apache.org> 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-2351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Muir updated LUCENE-2351: -------------------------------- Attachment: LUCENE-2351.patch attached is the same patch as before, except it includes a random test for Automaton. I stole the code from TestStressIndexing and create random unicode terms, and random regular expressions, and verify them against a brain-dead query that just brute forces every term. This found two unrelated bugs: * automaton didnt handle the 'empty term' correctly. * there was a logic bug in UnicodeUtil.nextValidUTF16String these are both also fixed in the patch... will commit soon. > optimize automatonquery > ----------------------- > > Key: LUCENE-2351 > URL: https://issues.apache.org/jira/browse/LUCENE-2351 > Project: Lucene - Java > Issue Type: Improvement > Components: Search > Affects Versions: Flex Branch > Reporter: Robert Muir > Priority: Minor > Fix For: Flex Branch > > Attachments: LUCENE-2351.patch, LUCENE-2351.patch, LUCENE-2351.patch, LUCENE-2351_infinite.patch, LUCENE-2351_infinite.patch > > > Mike found a few cases in flex where we have some bad behavior with automatonquery. > The problem is similar to a database query planner, where sometimes simply doing a full table scan is faster than using an index. > We can optimize automatonquery a little bit, and get better performance for fuzzy,wildcard,regex queries. > Here is a list of ideas: > * create commonSuffixRef for infinite automata, not just really-bad linear scan cases > * do a null check rather than populating an empty commonSuffixRef > * localize the 'linear' case to not seek, but instead scan, when ping-ponging against loops in the state machine > * add a mechanism to enable/disable the terms dict cache, e.g. we can disable it for infinite cases, and maybe fuzzy N>1 also. > * change the use of BitSet to OpenBitSet or long[] gen for path-tracking > * optimize the backtracking code where it says /* String is good to go as-is */, this need not be a full run(), I think... -- 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-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org