[ https://issues.apache.org/jira/browse/LUCENE-8017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16234144#comment-16234144 ]
Robert Muir commented on LUCENE-8017: ------------------------------------- {quote} re-instate getCoreAndDeletesCacheHelper (or CoreAndDocValues, or whatever we want to call it) so that doc-values based queries can be re-used between searchers if the DV gen is the same {quote} This seems really suboptimal given the fact you've added this method to Weight itself. Instead couldn't we alternatively just check context.reader.fieldInfos(field).dvGen from the new method in such queries, and if its -1, return the core cache helper, otherwise return null (or crappy per-reader stuff if we really must, but i don't think its helpful). Basically saying, I think its more important to cache normally in the case that you don't use the dv updates feature, versus worrying about cases where you do. presumably you are using the updates feature because values are changing too quickly to use updateDocument, so i don't think its worth optimizing. > FunctionRangeQuery and FunctionMatchQuery can pollute the QueryCache > -------------------------------------------------------------------- > > Key: LUCENE-8017 > URL: https://issues.apache.org/jira/browse/LUCENE-8017 > Project: Lucene - Core > Issue Type: Bug > Reporter: Alan Woodward > Assignee: Alan Woodward > Priority: Major > Attachments: LUCENE-8017.patch > > > The QueryCache assumes that queries will return the same set of documents > when run over the same segment, independent of all other segments held by the > parent IndexSearcher. However, both FunctionRangeQuery and > FunctionMatchQuery can select hits based on score, which depend on term > statistics over the whole index, and could therefore theoretically return > different result sets on a given segment. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org