I have a field with multi values like this: "100, 200, 300,1000". I need to
get the docs which contains any value from 100 to 500 in this filed. Is it
possible to run a range query against this multi-value field?
--
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/CAOe1oo8Xm_6h-xQNjLz%2B85h-c3QHR8LXC%2BbTn-gYt9_9i078gg%40mail.gmail.com .
For more options, visit https://groups.google.com/d/optout .
johtani
(Jun Ohtani)
February 5, 2015, 2:36am
2
Hi Rural,
Yes. An example is following
POST /multi_valued/sample/1
{
"prices" : [100,200,300,1000]
}
POST /multi_valued/sample/2
{
"prices" : [400,1000]
}
GET /multi_valued/sample/_search
{
"query": {
"range": {
"prices": {
"gte”: 100,
"lte": 300
}
}
}
}
-> Results : 1
GET /multi_valued/sample/_search
{
"query": {
"range": {
"prices": {
"gte": 600,
"lte": 1000
}
}
}
}
-> Results 1 and 2
Does it make sense?
Jun Ohtani
johtani@gmail.com
blog : http://blog.johtani.info
twitter : http://twitter.com/johtani
2015/02/04 21:07、Rural Hunter ruralhunter@gmail.com のメール:
I have a field with multi values like this: "100, 200, 300,1000". I need to get the docs which contains any value from 100 to 500 in this filed. Is it possible to run a range query against this multi-value field?
--
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/CAOe1oo8Xm_6h-xQNjLz%2B85h-c3QHR8LXC%2BbTn-gYt9_9i078gg%40mail.gmail.com .
For more options, visit https://groups.google.com/d/optout .
--
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/E21E36FE-446F-4862-AA38-B6EF4C44D74E%40gmail.com .
For more options, visit https://groups.google.com/d/optout .
yes, that's what I wanted. Thanks a lot!
2015-02-05 10:36 GMT+08:00 Jun Ohtani johtani@gmail.com :
Hi Rural,
Yes. An example is following
POST /multi_valued/sample/1
{
"prices" : [100,200,300,1000]
}
POST /multi_valued/sample/2
{
"prices" : [400,1000]
}
GET /multi_valued/sample/_search
{
"query": {
"range": {
"prices": {
"gte”: 100,
"lte": 300
}
}
}
}
-> Results : 1
GET /multi_valued/sample/_search
{
"query": {
"range": {
"prices": {
"gte": 600,
"lte": 1000
}
}
}
}
-> Results 1 and 2
Does it make sense?
Jun Ohtani
johtani@gmail.com
blog : http://blog.johtani.info
twitter : http://twitter.com/johtani
2015/02/04 21:07、Rural Hunter ruralhunter@gmail.com のメール:
I have a field with multi values like this: "100, 200, 300,1000". I need
to get the docs which contains any value from 100 to 500 in this filed. Is
it possible to run a range query against this multi-value field?
--
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/CAOe1oo8Xm_6h-xQNjLz%2B85h-c3QHR8LXC%2BbTn-gYt9_9i078gg%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout .
--
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/E21E36FE-446F-4862-AA38-B6EF4C44D74E%40gmail.com
.
For more options, visit https://groups.google.com/d/optout .
--
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/CAOe1oo9B3PbjCiJXoRV868aghyUDAfqoqHhPAeMsossQbhRhmw%40mail.gmail.com .
For more options, visit https://groups.google.com/d/optout .