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

Cao Manh Dat commented on SOLR-13808:
-------------------------------------

I kinda think that caching should be applicable to all types of query not just 
filter. So may be it can be something like this
```
{
        "query": {
                "cache": {
                        "query" : {
                                "filter" : {
                                        ///
                                }
                        }
                }
        }
}
```
By doing this, it gives to users the power on caching on any level of the query.
This is just my idea about syntax since I have not been able to look into 
QParsers and ExtensibleQuery deeply enough.

And it makes sense to me that all the nested {{filter}} queries inside {{bool}} 
should also be cached by default. So there are no different between using 
{{filter}} inside {{bool}} vs providing {{filters}} at the top level.

> Query DSL should let to cache filter
> ------------------------------------
>
>                 Key: SOLR-13808
>                 URL: https://issues.apache.org/jira/browse/SOLR-13808
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Mikhail Khludnev
>            Priority: Major
>
> Query DSL let to express Lucene BQ's filter
>  
> {code:java}
> { query: {bool: { filter: {term: {f:name,query:"foo bar"}}} }}{code}
> However, it might easily catch the need in caching it in filter cache. This 
> might rely on ExtensibleQuery and QParser: 
> {code:java}
> { query: {bool: { filter: {term: {f:name,query:"foo bar", cache:true}}} }}
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to