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

Never cache DocValuesFieldExistsQuery

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.6
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Currently DocValuesFieldExistsQuery is cached if there are no DV updates on the field in question. This query is pretty efficient and some experiments show that caching the result might be much more expensive than the benefits we get from caching the result.

      For example, indexing 10 million documents with long values and then executing this query:

      • without caching it takes around 1ms to run.
      • with caching it takes around 40ms to run and the size of the cache is around 1MB (1212792 bytes).

      I wonder if we should never cache this query as it seems the overhead of caching the results is not worthy.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ivera Ignacio Vera
                Reporter:
                ivera Ignacio Vera
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h