lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4571) speedup disjunction with minShouldMatch
Date Thu, 21 Feb 2013 13:56:14 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-4571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13583197#comment-13583197
] 

Michael McCandless commented on LUCENE-4571:
--------------------------------------------

base=trunk, comp=new patch (forced to use BS2):
{noformat}
                    Task    QPS base      StdDev    QPS comp      StdDev                Pct
diff
     Low3MinShouldMatch2        3.99      (3.1%)        3.09      (4.0%)  -22.5% ( -28% -
 -15%)
     Low2MinShouldMatch2        2.55      (3.1%)        2.01      (3.2%)  -21.1% ( -26% -
 -15%)
     Low1MinShouldMatch2        1.94      (3.1%)        1.53      (3.0%)  -21.1% ( -26% -
 -15%)
     HighMinShouldMatch2        1.63      (3.3%)        1.30      (2.9%)  -20.1% ( -25% -
 -14%)
     HighMinShouldMatch3        1.66      (3.7%)        1.35      (3.8%)  -18.8% ( -25% -
 -11%)
     Low4MinShouldMatch0        7.00      (3.2%)        5.94      (0.6%)  -15.2% ( -18% -
 -11%)
     Low1MinShouldMatch3        2.00      (3.4%)        1.72      (4.3%)  -13.7% ( -20% -
  -6%)
     Low3MinShouldMatch0        3.73      (2.8%)        3.29      (0.5%)  -11.7% ( -14% -
  -8%)
     Low2MinShouldMatch0        2.41      (2.9%)        2.15      (0.6%)  -10.7% ( -13% -
  -7%)
     Low1MinShouldMatch0        1.86      (2.8%)        1.69      (0.8%)   -9.3% ( -12% -
  -5%)
     HighMinShouldMatch0        1.57      (3.1%)        1.44      (0.8%)   -8.7% ( -12% -
  -4%)
     HighMinShouldMatch4        1.69      (3.8%)        1.62      (5.2%)   -4.3% ( -12% -
   4%)
     Low2MinShouldMatch3        2.67      (3.5%)        2.76      (5.3%)    3.3% (  -5% -
  12%)
     Low1MinShouldMatch4        2.04      (3.5%)        2.47      (6.4%)   20.7% (  10% -
  31%)
     Low4MinShouldMatch2        8.66      (4.7%)       34.28      (9.3%)  295.7% ( 268% -
 325%)
     Low4MinShouldMatch3        8.70      (4.8%)       45.76     (10.7%)  425.8% ( 391% -
 463%)
     Low3MinShouldMatch3        4.30      (3.7%)       23.87     (14.0%)  455.6% ( 422% -
 491%)
     Low4MinShouldMatch4        8.73      (4.4%)       60.81     (12.8%)  596.4% ( 554% -
 641%)
     Low2MinShouldMatch4        2.71      (3.6%)       21.71     (19.0%)  700.4% ( 654% -
 750%)
     Low3MinShouldMatch4        4.30      (3.7%)       35.44     (16.8%)  723.8% ( 678% -
 772%)
{noformat}

Weird that minShouldMatch0 is still a bit slower ...
                
> 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
>         Attachments: LUCENE-4571.patch, LUCENE-4571.patch
>
>
> 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


Mime
View raw message