You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Michael Gibney (Jira)" <ji...@apache.org> on 2022/02/10 22:32:00 UTC

[jira] [Commented] (SOLR-16002) FilterQuery (`filter([some_query])`) can be double-cached when used in certain contexts

    [ https://issues.apache.org/jira/browse/SOLR-16002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17490553#comment-17490553 ] 

Michael Gibney commented on SOLR-16002:
---------------------------------------

[PR #624|https://github.com/apache/solr/pull/624] adds a fix and a test that demonstrates the problem.

> FilterQuery (`filter([some_query])`) can be double-cached when used in certain contexts
> ---------------------------------------------------------------------------------------
>
>                 Key: SOLR-16002
>                 URL: https://issues.apache.org/jira/browse/SOLR-16002
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: main (10.0)
>            Reporter: Michael Gibney
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{FilterQuery}} (usually invoked by the {{filter([inner_query])}} syntax in the Standard Query Parser), can be double-cached if it's used in certain contexts. The clearest case is if you specify {{fq=filter(field_s:value)}}, this will hit the filterCache twice:
> # once at the top/fq level, as a FilterQuery
> # once as the inner {{field_s:value}} query, wrapped by the FilterQuery.
> This might seem like an anti-pattern, but there are cases where it's really practical to support this usage; namely, bundling main query and fqs into a single query (e.g., to use as the "foreground query" for SKG/relatedness ... but there are likely other cases). Without the ability to consult the cache for wrapped clauses, such a use case hits serious problems. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org