Range Search
Edit pageTest range search with field_terms
Section titled “Test range search with field_terms”Index document with type
Section titled “Index document with type”PUT /test/field_terms/doc20
{ "foo": { "_type": "integer", "_value": 20, "_index": "field_terms", }}PUT /test/field_terms/doc100
{ "foo": { "_type": "integer", "_value": 100, "_index": "field_terms", }}PUT /test/field_terms/doc180
{ "foo": { "_type": "integer", "_value": 180, "_index": "field_terms", }}PUT /test/field_terms/doc210
{ "foo": { "_type": "integer", "_value": 210, "_index": "field_terms", }}Range search for field_terms
Section titled “Range search for field_terms”SEARCH /test/field_terms/
{ "_query": { "foo": { "_in": { "_range": { "_from": 50, "_to": 150 } } } }}Test range search with field_values
Section titled “Test range search with field_values”PUT /test/field_values/doc20
{ "foo": { "_type": "integer", "_value": 20, "_index": "field_values", }}Index document with type
Section titled “Index document with type”PUT /test/field_values/doc100
{ "foo": { "_type": "integer", "_value": 100, "_index": "field_values", }}PUT /test/field_values/doc180
{ "foo": { "_type": "integer", "_value": 180, "_index": "field_values", }}PUT /test/field_values/doc210
{ "foo": { "_type": "integer", "_value": 210, "_index": "field_values", }}Range search for field_values
Section titled “Range search for field_values”SEARCH /test/field_values/
{ "_query": { "foo": { "_in": { "_range": { "_from": 50, "_to": 150 } } } }}Test range search with field_all
Section titled “Test range search with field_all”Index document with type
Section titled “Index document with type”PUT /test/field_all/doc20
{ "foo": { "_type": "integer", "_value": 20, "_index": "field_all", }}PUT /test/field_all/doc100
{ "foo": { "_type": "integer", "_value": 100, "_index": "field_all", }}PUT /test/field_all/doc180
{ "foo": { "_type": "integer", "_value": 180, "_index": "field_all", }}PUT /test/field_all/doc210
{ "foo": { "_type": "integer", "_value": 210, "_index": "field_all", }}Range search for field_all
Section titled “Range search for field_all”SEARCH /test/field_all/
{ "_query": { "foo": { "_in": { "_range": { "_from": 50, "_to": 150 } } } }}