magibney commented on pull request #624:
URL: https://github.com/apache/solr/pull/624#issuecomment-1045163521


   Sorry, I misunderstood what you meant in your [comment 
above](#pullrequestreview-887690496). But in any event I still think the 
concern is not warranted:
   
   1. `fq=filter({!cache=false}foo:bar)` would currently cache the FilterQuery, 
but not the inner query, so subsequent requests for `fq=foo:bar` would not be a 
cache hit.
   2. `fq=filter(foo:bar)` currently caches twice, this PR would cause to only 
cache `foo:bar`
   3. `fq={!cache=false}filter(foo:bar)`, oddly, would currently only cache the 
inner query (behavior equivalent to what this PR introduces as the default for 
`fq=filter(foo:bar)`
   4. `fq={!cache=true}filter(foo:bar)` -- i.e., explicitly requesting that the 
FilterQuery _per se_ be cached, would throw an IllegalArgumentException under 
the new PR, and on current main the behavior of this would be equivalent to 
`fq=filter(foo:bar)`: double-caching. I mean, we could skip the IAE, but this 
is really really wrong -- I can't think of any circumstance where you'd 
actually want this.
   5. And yes, you'd be better off with `(foo:bar)^=1` for an explicit 
ConstantScoreQuery; currently in order to support the use case you mention 
(using FilterQuery to filter but _not_ cache), iiuc you'd have to do this: 
`filter({!cache=false}foo:bar)`!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to