Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3, 5.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Applying the same approach as LUCENE-4923 gives ~ 30% improvement according to luceneutil.

                          Task   QPS trunk      StdDev   QPS patch      StdDev                Pct diff
                 OrMaxHighHigh       17.94      (2.7%)       23.23      (3.1%)   29.5% (  23% -   36%)
                  OrMaxHighLow       28.08      (2.6%)       37.11      (3.9%)   32.1% (  25% -   39%)
                  OrMaxHighMed       16.80      (2.7%)       22.25      (3.9%)   32.5% (  25% -   40%)
      
      diff -r e0ea40cf243c perf/TaskParser.java
      --- a/perf/TaskParser.java	Mon Apr 01 14:49:08 2013 +0200
      +++ b/perf/TaskParser.java	Wed Apr 10 22:35:40 2013 -0400
      @@ -31,6 +31,7 @@
       import org.apache.lucene.search.BooleanClause;
       import org.apache.lucene.search.BooleanQuery;
       import org.apache.lucene.search.CachingWrapperFilter;
      +import org.apache.lucene.search.DisjunctionMaxQuery;
       import org.apache.lucene.search.Filter;
       import org.apache.lucene.search.NumericRangeQuery;
       import org.apache.lucene.search.Query;
      @@ -169,6 +170,17 @@
                                         true);
               sort = null;
               group = null;
      +      } else if (text.startsWith("disjunctionMax//")) {
      +        final int spot3 = text.indexOf(' ');
      +        if (spot3 == -1) {
      +          throw new RuntimeException("failed to parse query=" + text);
      +        }
      +        DisjunctionMaxQuery dismax = new DisjunctionMaxQuery(1f);
      +        dismax.add(new TermQuery(new Term(fieldName, text.substring(16, spot3))));
      +        dismax.add(new TermQuery(new Term(fieldName, text.substring(spot3+1).trim())));
      +        query = dismax;
      +        sort = null;
      +        group = null;
             } else if (text.startsWith("nrq//")) {
               // field start end
               final int spot3 = text.indexOf(' ');
      
      
      cat wikimedium.10M.nostopwords.tasks | grep "^Or" | sed -e "s/Or\([a-zA-Z]*\)\:\ /OrMax\1\:\ disjunctionMax\/\//g" > dismax.tasks
      

        Activity

        Robert Muir created issue -
        Robert Muir made changes -
        Field Original Value New Value
        Attachment LUCENE-4926.patch [ 12578145 ]
        Hide
        Michael McCandless added a comment -

        +1 to both lucene and luceneutil patch, nice speedups!

        Show
        Michael McCandless added a comment - +1 to both lucene and luceneutil patch, nice speedups!
        Robert Muir made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 5.0 [ 12321663 ]
        Fix Version/s 4.3 [ 12324143 ]
        Resolution Fixed [ 1 ]
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development