Then, try to wrap your filter in a FilteredQuery with a MatchAll Query.
That said, you have to use POST. If you don't use it, ES will use URL parameters (q=* for example).
Best, if you could provide (gist) a full curl recreation, I will try to help you.
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 27 nov. 2012 à 20:26, Alexey Astafyev av.astafyev@gmail.com a écrit :
Sorry, but it doesn't help
I get success with the following attribute and query:
age_category: {
id: 9,
name: [
"age en",
"age ru"
]
}
curl -X GET "http://localhost:9200/videos/_search?from=0&load=true&size=10&pretty=true" -d '{"filter":{"terms":{"age_category.name":["age en"]}}}'
But, when I'm trying to search on array, it fails.
On Tuesday, November 27, 2012 11:14:35 PM UTC+4, David Pilato wrote:
Try with -XPOST
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 27 nov. 2012 à 20:07, Alexey Astafyev av.as...@gmail.com a écrit :
Hello everyone,
I have a problem with filter queries.
Here is my piece of index:
broadcasting_regions:
[
{
region:
{
id: 26,
name:
[
"enenenen",
"rururu"
]
},
country:
{
id: 0,
name:
}
}
],
I'm trying to filter items by 'broadcasting_regions.region.name' with the following curl query:
curl -X GET "http://localhost:9200/videos/_search?from=0&load=true&size=10&pretty=true" -d '{"filter":{"terms":{"broadcasting_regions.region.name":["rururu"]}}}'
Unfortunately I get nothing:
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" :
}
}
Could you please tell me what's wrong with my query?
--
--