From issues-return-5456-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Tue Nov 26 13:34:10 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2A0C118065D for ; Tue, 26 Nov 2019 14:34:10 +0100 (CET) Received: (qmail 75035 invoked by uid 500); 26 Nov 2019 13:34:09 -0000 Mailing-List: contact issues-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 issues@lucene.apache.org Received: (qmail 75026 invoked by uid 99); 26 Nov 2019 13:34:09 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Nov 2019 13:34:09 +0000 From: GitBox To: issues@lucene.apache.org Subject: [GitHub] [lucene-solr] romseygeek commented on a change in pull request #1037: LUCENE-9062: QueryVisitor.consumeTermsMatching Message-ID: <157477524941.17509.7948363826059106760.gitbox@gitbox.apache.org> Date: Tue, 26 Nov 2019 13:34:09 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit romseygeek commented on a change in pull request #1037: LUCENE-9062: QueryVisitor.consumeTermsMatching URL: https://github.com/apache/lucene-solr/pull/1037#discussion_r350742934 ########## File path: lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java ########## @@ -156,9 +160,13 @@ public Automaton toAutomaton() { @Override public void visit(QueryVisitor visitor) { - // TODO find some way of consuming Automata - if (visitor.acceptField(term.field())) { - visitor.visitLeaf(this); + if (visitor.acceptField(field)) { + if (maxEdits == 0 || prefixLength >= term.text().length()) { + visitor.consumeTerms(this, term); + } else { + visitor.consumeTermsMatching(this, field, + new ByteRunAutomaton(toAutomaton(), false, Operations.DEFAULT_MAX_DETERMINIZED_STATES)); Review comment: I opened https://issues.apache.org/jira/browse/LUCENE-9068 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org For additional commands, e-mail: issues-help@lucene.apache.org