Function score query filter cache does not work


(David G Ortega) #1

Hi!!

this works

{
"query" :
{
"function_score":
{
"score_mode" : "first",
"boost_mode" : "replace",
"query" :
{
"match_all" : {}
},
"functions":
[
{
"filter":
{
"query" :
{
"terms" :
{
"user" : ["kimchy"],
"minimum_should_match" : 1
}
}
},
"script_score":
{
"script" : "100"
}
}
]
}
}
}

this not

{
"query" :
{
"function_score":
{
"score_mode" : "first",
"boost_mode" : "replace",
"query" :
{
"match_all" : {}
},
"functions":
[
{
"filter":
{
"fquery" :
{
"query" :
{
"terms" :
{
"user" : ["kimchy"],
"minimum_should_match" : 1
}
}
},
"_cache" : true
},
"script_score":
{
"script" : "100"
}
}
]
}
}
}

accoding to the
documentation http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-filter.html
this is how should be defined to use cache.
Is this a bug? Do I have to open a ticket?

If not... how can we setup the filter cache?

Thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/54b802c6-5cd8-49a8-8828-f857418a813e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(David G Ortega) #2

No one? Ok opening a ticket :wink:

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/667337c4-eed2-4942-a79d-18eaeaf90d84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #3