Lucene - Core
  1. Lucene - Core
  2. LUCENE-2868

It should be easy to make use of TermState; rewritten queries should be shared automatically

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core/query/scoring
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      When you have the same query in a query hierarchy multiple times, tremendous savings can now be had if the user knows enough to share the rewritten queries in the hierarchy, due to the TermState addition. But this is clumsy and requires a lot of coding by the user to take advantage of. Lucene should be smart enough to share the rewritten queries automatically.

      This can be most readily (and powerfully) done by introducing a new method to Query.java:

      Query rewriteUsingCache(IndexReader indexReader)

      ... and including a caching implementation right in Query.java which would then work for all. Of course, all callers would want to use this new method rather than the current rewrite().

      1. query-rewriter.patch
        37 kB
        Simon Willnauer
      2. LUCENE-2868.patch
        35 kB
        Karl Wright
      3. LUCENE-2868.patch
        37 kB
        Karl Wright
      4. LUCENE-2868.patch
        35 kB
        Karl Wright
      5. lucene-2868.patch
        64 kB
        Karl Wright
      6. lucene-2868.patch
        78 kB
        Karl Wright

        Activity

        Karl Wright created issue -
        Karl Wright made changes -
        Field Original Value New Value
        Summary It should be easy to make use of TermCache; rewritten queries should be shared automatically It should be easy to make use of TermState; rewritten queries should be shared automatically
        Description When you have the same query in a query hierarchy multiple times, tremendous savings can now be had if the user knows enough to share the rewritten queries in the hierarchy, due to the TermCache addition. But this is clumsy and requires a lot of coding by the user to take advantage of. Lucene should be smart enough to share the rewritten queries automatically.

        This can be most readily (and powerfully) done by introducing a new method to Query.java:

        Query rewriteUsingCache(IndexReader indexReader)

        ... and including a caching implementation right in Query.java which would then work for all. Of course, all callers would want to use this new method rather than the current rewrite().
        When you have the same query in a query hierarchy multiple times, tremendous savings can now be had if the user knows enough to share the rewritten queries in the hierarchy, due to the TermState addition. But this is clumsy and requires a lot of coding by the user to take advantage of. Lucene should be smart enough to share the rewritten queries automatically.

        This can be most readily (and powerfully) done by introducing a new method to Query.java:

        Query rewriteUsingCache(IndexReader indexReader)

        ... and including a caching implementation right in Query.java which would then work for all. Of course, all callers would want to use this new method rather than the current rewrite().
        Simon Willnauer made changes -
        Attachment query-rewriter.patch [ 12468371 ]
        Karl Wright made changes -
        Attachment lucene-2868.patch [ 12469187 ]
        Karl Wright made changes -
        Attachment lucene-2868.patch [ 12469277 ]
        Mark Thomas made changes -
        Workflow jira [ 12542482 ] Default workflow, editable Closed status [ 12563886 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12563886 ] jira [ 12585392 ]
        Karl Wright made changes -
        Attachment LUCENE-2868.patch [ 12473991 ]
        Karl Wright made changes -
        Attachment LUCENE-2868.patch [ 12474005 ]
        Simon Willnauer made changes -
        Assignee Simon Willnauer [ simonw ]
        Simon Willnauer made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Karl Wright made changes -
        Attachment LUCENE-2868.patch [ 12481784 ]

          People

          • Assignee:
            Simon Willnauer
            Reporter:
            Karl Wright
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development