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 635A9D79E for ; Fri, 23 Nov 2012 21:25:00 +0000 (UTC) Received: (qmail 84215 invoked by uid 500); 23 Nov 2012 21:24:58 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 84110 invoked by uid 500); 23 Nov 2012 21:24:58 -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 84031 invoked by uid 99); 23 Nov 2012 21:24:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Nov 2012 21:24:58 +0000 Date: Fri, 23 Nov 2012 21:24:58 +0000 (UTC) From: "Mikhail Khludnev (JIRA)" To: dev@lucene.apache.org Message-ID: <2118195471.19620.1353705898646.JavaMail.jiratomcat@arcas> In-Reply-To: <755935863.19261.1353682859881.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (LUCENE-4571) speedup disjunction with minShouldMatch 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-4571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503285#comment-13503285 ] Mikhail Khludnev commented on LUCENE-4571: ------------------------------------------ Robert, I've got your points. I need some time to familiarize with luceneutil. btw, why it's not in the main Lucene codebase (I assume it's a frequent question)? About BS1 (despite it's an offtop formally), I'm not really understand how you want to score via [term-at-time|http://nlp.stanford.edu/IR-book/html/htmledition/computing-vector-scores-1.html#fig:cosinealg] for minShouldMatch, will you allocate more than single bit (or even byte) per document in a buffer? > speedup disjunction with minShouldMatch > ---------------------------------------- > > Key: LUCENE-4571 > URL: https://issues.apache.org/jira/browse/LUCENE-4571 > Project: Lucene - Core > Issue Type: Improvement > Components: core/search > Affects Versions: 4.1 > Reporter: Mikhail Khludnev > > even minShouldMatch is supplied to DisjunctionSumScorer it enumerates whole disjunction, and verifies minShouldMatch condition [on every doc|https://github.com/apache/lucene-solr/blob/trunk/lucene/core/src/java/org/apache/lucene/search/DisjunctionSumScorer.java#L70]: > {code} > public int nextDoc() throws IOException { > assert doc != NO_MORE_DOCS; > while(true) { > while (subScorers[0].docID() == doc) { > if (subScorers[0].nextDoc() != NO_MORE_DOCS) { > heapAdjust(0); > } else { > heapRemoveRoot(); > if (numScorers < minimumNrMatchers) { > return doc = NO_MORE_DOCS; > } > } > } > afterNext(); > if (nrMatchers >= minimumNrMatchers) { > break; > } > } > > return doc; > } > {code} > [~spo] proposes (as well as I get it) to pop nrMatchers-1 scorers from the heap first, and then push them back advancing behind that top doc. For me the question no.1 is there a performance test for minShouldMatch constrained disjunction. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org