Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3056

Support Query Rewriting Caching

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: 4.9, 6.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Out of LUCENE-3041, its become apparent that using a Visitor / Walker isn't right for caching the rewrites of Querys. Although we still intend to introduce the Query / Walker for advanced query transformations, rewriting still serves a purpose for very specific implementation detail writing. As such, it can be very expensive. So I think we should introduce first class support for rewrite caching. I also feel the key is to make the caching as transparent as possible, to reduce the strain on Query implementors.

      The TermState idea gave me the idea of maybe making a RewriteState / RewriteCache / RewriteInterceptor, which would be consulted for rewritten Querys. It would then maintain an internal cache that it would check. If a value wasn't found, it'd then call Query#rewrite, and cache the result.

      By having this external rewrite source, people could 'pre' rewrite Querys if they were particularly expensive but also common.

        Attachments

        1. LUCENE-3056.patch
          11 kB
          Chris Male
        2. LUCENE-3056.patch
          10 kB
          Chris Male

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                cmale Chris Male
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: