You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Cao Manh Dat (Jira)" <ji...@apache.org> on 2019/10/16 09:10:00 UTC
[jira] [Comment Edited] (SOLR-13808) Query DSL should let to cache
filter
[ https://issues.apache.org/jira/browse/SOLR-13808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16952635#comment-16952635 ]
Cao Manh Dat edited comment on SOLR-13808 at 10/16/19 9:09 AM:
---------------------------------------------------------------
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
{code}
{
"query": {
"cache": {
"query" : {
"filter" : {
///
}
}
}
}
}
{code}
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.
was (Author: caomanhdat):
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org