Don't improve performances with BitSet filters

Hi
in the past i have all the filters in the query like this :

{
"from": 0,
"size": 10,
"query": {
"bool": {
"must": [
{
"nested": {
"path": "readableSpaces",
"query": {
"terms": {
"readableSpaces.id": [
43
]
}
}
}
},
{
"terms": {
"postTypes": [
3,
4
]
}
},
{
"nested": {
"path": "folders",
"query": {
"terms": {
"folders.id": [
0,
23,
22
]
}
}
}
}
],
"mustNot": [
{
"terms": {
"status": [
2,
0
]
}
}
]
}
},
"fields": [
"title"
]
}

after i read the
post http://www.elasticsearch.org/blog/all-about-elasticsearch-filter-bitsets/
i change all the filter to have better performances but unfortunately no
improve of performace in the jmeter test so i dont know if i do someting
wrong ?

{
"from": 0,
"size": 10,
"query": {
"filtered": {
"filter": {
"bool": {
"must": [
{
"nested": {
"path": "readableSpaces",
"filter": {
"term": {
"readableSpaces.id": 43
}
}
}
},
{
"terms": {
"postTypes": [
3,
4
]
}
},
{
"nested": {
"path": "folders",
"filter": {
"terms": {
"folders.id": [
0,
23,
22
]
}
}
}
}
],
"mustNot": [
{
"terms": {
"status": [
2,
0
]
}
}
],
"_cache": true
}
}
}
},
"fields": [
"title"
]
}

--
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/c3381fdf-6db6-43d3-b878-9bd41ca62406%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Camilo,

I didn't look in detail at your query, but you should be able to see a
performance improvement on a larger index (i.e. millions of docs). If you
only have a couple hundred/thousand docs, you may or may not see a
difference (depending on your data and queries of course). Also the
performance improvement will come after the filter is cached and you run
the queries again, i.e., not when you execute your filtered query for the
first time and ES was building the initial cache for your filter condition.

--
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/a0aa420e-adef-4f52-a3cb-644570c481e8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

ok thank you Binh

On Wednesday, January 22, 2014 6:36:18 PM UTC+1, Binh Ly wrote:

Camilo,

I didn't look in detail at your query, but you should be able to see a
performance improvement on a larger index (i.e. millions of docs). If you
only have a couple hundred/thousand docs, you may or may not see a
difference (depending on your data and queries of course). Also the
performance improvement will come after the filter is cached and you run
the queries again, i.e., not when you execute your filtered query for the
first time and ES was building the initial cache for your filter condition.

--
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/f556788e-d6b2-4a04-95c6-05b4eab42d8a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.