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

Cache compound filters earlier than regular queries

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Minor
    • Resolution: Fixed
    • None
    • 6.5, 7.0
    • None
    • None
    • New

    Description

      Say you keep reusing a boolean filter that looks like "A OR B" and never use the A and B queries out of that boolean query. Currently, after this filter has been used 5 times, we would cache both A, B and "A OR B", which means that cache entries for A and B would only be built for the purpose of building a cache entry for "A OR B", which is wasteful.

      By caching compound queries a bit earlier, we could make it less likely to happen since:

      • we only consider queries as consumed if a scorer is pulled
      • once the boolean query is cached, we stop pulling scorers on the A and B queries

      Attachments

        1. LUCENE-7677.patch
          4 kB
          Adrien Grand

        Activity

          People

            Unassigned Unassigned
            jpountz Adrien Grand
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: