paul1
(paul)
November 27, 2013, 9:07am
1
My data:
name: Abc College
rankingList: [
{
value: 8
key: Academic
}
{
value: 8
key: career
}
]
I Need all the college with Academic > 8
My query
"query": {
"bool": {
"must": [
{
"match": {
"rankingList.key": "Academic"
}
},
{
"match": {
"rankingList.value": 9
}
}
]
}
}
But this query give all the data has Academic and 9 in rankingList but not
that has Academic whose value is 8.
response
rankingList: [
{
value: 5
key: Academic
}
{
value: 8
key: career
}
],
rankingList: [
{
value: 8
key: sports
}
{
value: 5
key: career
}
]
--
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/781c3fbf-3518-4443-90e4-c0cf8077c02d%40googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
paul1
(paul)
November 27, 2013, 9:47am
2
On Wednesday, 27 November 2013 14:37:29 UTC+5:30, paul wrote:
My data:
name: Abc College
rankingList: [
{
value: 8
key: Academic
}
{
value: 8
key: career
}
]
I Need all the college with Academic > 8
My query
"query": {
"bool": {
"must": [
{
"match": {
"rankingList.key": "Academic"
}
},
{
"match": {
"rankingList.value": 9
}
}
]
}
}
But this query give all the data has Academic and 9 in rankingList but not
that has Academic whose value is 8.
response
rankingList: [
{
value: 5
key: Academic
}
{
value: 8
key: career
}
],
rankingList: [
{
value: 8
key: sports
}
{
value: 5
key: career
}
]
Got the answer at
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
--
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/6cf0760f-baf4-478a-81e3-37510fe15ce0%40googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .