rest-api-spec.test.search.340_doc_values_field.yml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rest-api-spec Show documentation
Show all versions of rest-api-spec Show documentation
OpenSearch subproject :rest-api-spec
The newest version!
setup:
- skip:
features: [ "headers" ]
version: " - 2.11.99"
reason: "searching with only doc_values was added in 2.12.0"
---
"search on fields with both index and doc_values enabled":
- do:
indices.create:
index: test-iodvq
body:
mappings:
properties:
some_keyword:
type: keyword
index: true
doc_values: true
byte:
type: byte
index: true
doc_values: true
double:
type: double
index: true
doc_values: true
float:
type: float
index: true
doc_values: true
half_float:
type: half_float
index: true
doc_values: true
integer:
type: integer
index: true
doc_values: true
long:
type: long
index: true
doc_values: true
short:
type: short
index: true
doc_values: true
unsigned_long:
type: unsigned_long
index: true
doc_values: true
ip_field:
type: ip
index: true
doc_values: true
boolean:
type: boolean
index: true
doc_values: true
date:
type: date
index: true
doc_values: true
date_nanos:
type: date_nanos
index: true
doc_values: true
- do:
bulk:
index: test-iodvq
refresh: true
body:
- '{"index": {"_index": "test-iodvq", "_id": "1" }}'
- '{ "some_keyword": "ingesting some random keyword data", "byte": 120, "double": 100.0, "float": "800.0", "half_float": "400.0", "integer": 1290, "long": 13456, "short": 150, "unsigned_long": 10223372036854775800, "ip_field": "192.168.0.1", "boolean": true, "date_nanos": "2018-10-29T12:12:12.123456789Z", "date": "2018-10-29T12:12:12.987Z" }'
- '{ "index": { "_index": "test-iodvq", "_id": "2" }}'
- '{ "some_keyword": "400", "byte": 121, "double": 101.0, "float": "801.0", "half_float": "401.0", "integer": 1291, "long": 13457, "short": 151, "unsigned_long": 10223372036854775801, "ip_field": "192.168.0.2", "boolean": true, "date_nanos": "2020-10-29T12:12:12.987654321Z", "date": "2020-10-29T12:12:12.987Z" }'
- '{ "index": { "_index": "test-iodvq", "_id": "3" } }'
- '{ "some_keyword": "5", "byte": 122, "double": 102.0, "float": "802.0", "half_float": "402.0", "integer": 1292, "long": 13458, "short": 152, "unsigned_long": 10223372036854775802, "ip_field": "192.168.0.3", "boolean": false, "date_nanos": "2024-10-29T12:12:12.987654321Z", "date": "2024-10-29T12:12:12.987Z" }'
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
prefix:
some_keyword: "ing"
- match: { hits.hits.0._source.some_keyword: "ingesting some random keyword data" }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
"some_keyword": {
"lt": 500
} }
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
term:
half_float: 400.0
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
term:
float: 800.0
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
term:
double: 100.0
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
term:
byte: 120
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
term:
short: 150
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
term:
integer: 1291
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
term:
long: 13456
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
term:
unsigned_long: 10223372036854775800
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
term:
ip_field: "192.168.0.1"
- match: {hits.total: 1}
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
term:
boolean: true
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
terms:
half_float: [ 400.0, 401.0 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
terms:
float: [ 800.0, 801.0 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
terms:
byte: [ 120, 121 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
terms:
double: [ 100.0, 101.0 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
terms:
short: [ 150, 151 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
terms:
integer: [ 1290, 1291 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
terms:
long: [ 13456, 13457 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
terms:
unsigned_long: [ 10223372036854775800, 10223372036854775801 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
terms:
ip_field: ["192.168.0.1", "192.168.0.2"]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
terms:
boolean: [true, false]
- match: { hits.total: 3 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
half_float: {
gte: 401.0,
lte: 402.0
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
float: {
gte: 801.0,
lte: 802.0
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
byte: {
gte: 120,
lte: 121
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
double: {
gte: 101.0,
lte: 102.0
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
short: {
gte: 151,
lte: 152
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
integer: {
gte: 1291,
lte: 1292
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
long: {
gte: 13457,
lte: 13458
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
unsigned_long: {
gte: 10223372036854775801,
lte: 10223372036854775802
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range:
ip_field:
gte: "192.168.0.1"
lte: "192.168.0.2"
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
date_nanos: {
gte: "2018-10-29T12:12:12.123456789Z"
},
}
- match: { hits.total: 3 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
date: {
gte: "2018-10-29T12:12:12.987Z",
lte: "2020-10-29T12:12:12.987Z"
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
boolean: {
gte: true
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
boolean: {
lte: true
},
}
- match: { hits.total: 3 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
boolean: {
lte: true,
gte: false
},
}
- match: { hits.total: 3 }
- do:
search:
rest_total_hits_as_int: true
index: test-iodvq
body:
query:
range: {
boolean: {
lte: false,
gte: true
},
}
- match: { hits.total: 0 }
---
"search on fields with only index enabled":
- do:
indices.create:
index: test-index
body:
mappings:
properties:
some_keyword:
type: keyword
index: true
doc_values: false
byte:
type: byte
index: true
doc_values: false
double:
type: double
index: true
doc_values: false
float:
type: float
index: true
doc_values: false
half_float:
type: half_float
index: true
doc_values: false
integer:
type: integer
index: true
doc_values: false
long:
type: long
index: true
doc_values: false
short:
type: short
index: true
doc_values: false
unsigned_long:
type: unsigned_long
index: true
doc_values: false
ip_field:
type: ip
index: true
doc_values: false
boolean:
type: boolean
index: true
doc_values: false
date_nanos:
type: date_nanos
index: true
doc_values: false
date:
type: date
index: true
doc_values: false
- do:
bulk:
index: test-index
refresh: true
body:
- '{"index": {"_index": "test-index", "_id": "1" }}'
- '{ "some_keyword": "ingesting some random keyword data", "byte": 120, "double": 100.0, "float": "800.0", "half_float": "400.0", "integer": 1290, "long": 13456, "short": 150, "unsigned_long": 10223372036854775800, "ip_field": "192.168.0.1", "boolean": true, "date_nanos": "2018-10-29T12:12:12.123456789Z", "date": "2018-10-29T12:12:12.987Z" }'
- '{ "index": { "_index": "test-index", "_id": "2" }}'
- '{ "some_keyword": "400", "byte": 121, "double": 101.0, "float": "801.0", "half_float": "401.0", "integer": 1291, "long": 13457, "short": 151, "unsigned_long": 10223372036854775801, "ip_field": "192.168.0.2", "boolean": true, "date_nanos": "2020-10-29T12:12:12.123456789Z", "date": "2020-10-29T12:12:12.987Z" }'
- '{ "index": { "_index": "test-index", "_id": "3" } }'
- '{ "some_keyword": "5", "byte": 122, "double": 102.0, "float": "802.0", "half_float": "402.0", "integer": 1292, "long": 13458, "short": 152, "unsigned_long": 10223372036854775802, "ip_field": "192.168.0.3", "boolean": false, "date_nanos": "2024-10-29T12:12:12.123456789Z", "date": "2024-10-29T12:12:12.987Z" }'
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
prefix:
some_keyword: "ing"
- match: { hits.hits.0._source.some_keyword: "ingesting some random keyword data" }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
"some_keyword": {
"lt": 500
} }
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
term:
half_float: 400.0
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
term:
float: 800.0
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
term:
double: 100.0
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
term:
byte: 120
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
term:
short: 150
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
term:
integer: 1291
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
term:
long: 13456
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
term:
unsigned_long: 10223372036854775800
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
term:
ip_field: "192.168.0.1"
- match: {hits.total: 1}
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
term:
boolean: true
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
terms:
half_float: [ 400.0, 401.0 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
terms:
float: [ 800.0, 801.0 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
terms:
byte: [ 120, 121 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
terms:
double: [ 100.0, 101.0 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
terms:
short: [ 150, 151 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
terms:
integer: [ 1290, 1291 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
terms:
long: [ 13456, 13457 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
terms:
unsigned_long: [ 10223372036854775800, 10223372036854775801 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
terms:
ip_field: ["192.168.0.1", "192.168.0.2"]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
terms:
boolean: [true, false]
- match: { hits.total: 3 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
half_float: {
gte: 401.0,
lte: 402.0
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
float: {
gte: 801.0,
lte: 802.0
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
byte: {
gte: 120,
lte: 121
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
double: {
gte: 101.0,
lte: 102.0
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
short: {
gte: 151,
lte: 152
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
integer: {
gte: 1291,
lte: 1292
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
long: {
gte: 13457,
lte: 13458
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
unsigned_long: {
gte: 10223372036854775801,
lte: 10223372036854775802
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range:
ip_field:
gte: "192.168.0.1"
lte: "192.168.0.2"
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
date_nanos: {
gte: "2018-10-29T12:12:12.123456789Z"
},
}
- match: { hits.total: 3 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
date: {
gte: "2018-10-29T12:12:12.987Z",
lte: "2020-10-29T12:12:12.987Z"
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
boolean: {
gte: true
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
boolean: {
lte: true
},
}
- match: { hits.total: 3 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
boolean: {
lte: true,
gte: false
},
}
- match: { hits.total: 3 }
- do:
search:
rest_total_hits_as_int: true
index: test-index
body:
query:
range: {
boolean: {
lte: false,
gte: true
},
}
- match: { hits.total: 0 }
---
"search on fields with only doc_values enabled":
- skip:
features: [ "headers" ]
version: " - 2.99.99"
reason: "searching with only doc_values was added in 3.0.0"
- do:
indices.create:
index: test-doc-values
body:
mappings:
properties:
some_keyword:
type: keyword
index: false
doc_values: true
byte:
type: byte
index: false
doc_values: true
double:
type: double
index: false
doc_values: true
float:
type: float
index: false
doc_values: true
half_float:
type: half_float
index: false
doc_values: true
integer:
type: integer
index: false
doc_values: true
long:
type: long
index: false
doc_values: true
short:
type: short
index: false
doc_values: true
unsigned_long:
type: unsigned_long
index: false
doc_values: true
ip_field:
type: ip
index: false
doc_values: true
boolean:
type: boolean
index: false
doc_values: true
date_nanos:
type: date_nanos
index: false
doc_values: true
date:
type: date
index: false
doc_values: true
- do:
bulk:
index: test-doc-values
refresh: true
body:
- '{"index": {"_index": "test-doc-values", "_id": "1" }}'
- '{ "some_keyword": "ingesting some random keyword data", "byte": 120, "double": 100.0, "float": "800.0", "half_float": "400.0", "integer": 1290, "long": 13456, "short": 150, "unsigned_long": 10223372036854775800, "ip_field": "192.168.0.1", "boolean": true, "date_nanos": "2018-10-29T12:12:12.123456789Z", "date": "2018-10-29T12:12:12.987Z" }'
- '{ "index": { "_index": "test-doc-values", "_id": "2" }}'
- '{ "some_keyword": "400", "byte": 121, "double": 101.0, "float": "801.0", "half_float": "401.0", "integer": 1291, "long": 13457, "short": 151, "unsigned_long": 10223372036854775801, "ip_field": "192.168.0.2", "boolean": true, "date_nanos": "2020-10-29T12:12:12.123456789Z", "date": "2020-10-29T12:12:12.987Z" }'
- '{ "index": { "_index": "test-doc-values", "_id": "3" } }'
- '{ "some_keyword": "5", "byte": 122, "double": 102.0, "float": "802.0", "half_float": "402.0", "integer": 1292, "long": 13458, "short": 152, "unsigned_long": 10223372036854775802, "ip_field": "192.168.0.3", "boolean": false, "date_nanos": "2024-10-29T12:12:12.123456789Z", "date": "2024-10-29T12:12:12.987Z" }'
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
prefix:
some_keyword: "ing"
- match: { hits.hits.0._source.some_keyword: "ingesting some random keyword data" }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
"some_keyword": {
"lt": 500
} }
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
term:
half_float: 400.0
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
term:
float: 800.0
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
term:
double: 100.0
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
term:
byte: 120
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
term:
short: 150
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
term:
integer: 1291
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
term:
long: 13456
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
term:
unsigned_long: 10223372036854775800
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
term:
ip_field: "192.168.0.3"
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
term:
boolean: false
- match: { hits.total: 1 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
terms:
half_float: [ 400.0, 401.0 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
terms:
float: [ 800.0, 801.0 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
terms:
byte: [ 120, 121 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
terms:
double: [ 100.0, 101.0 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
terms:
short: [ 150, 151 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
terms:
integer: [ 1290, 1291 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
terms:
long: [ 13456, 13457 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
terms:
unsigned_long: [ 10223372036854775800, 10223372036854775801 ]
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
terms:
boolean: [true, false]
- match: { hits.total: 3 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
half_float: {
gte: 401.0,
lte: 402.0
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
float: {
gte: 801.0,
lte: 802.0
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
byte: {
gte: 120,
lte: 121
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
double: {
gte: 101.0,
lte: 102.0
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
short: {
gte: 151,
lte: 152
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
integer: {
gte: 1291,
lte: 1292
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
long: {
gte: 13457,
lte: 13458
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
unsigned_long: {
gte: 10223372036854775801,
lte: 10223372036854775802
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range:
ip_field:
gte: "192.168.0.1"
lte: "192.168.0.2"
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
date_nanos: {
gte: "2018-10-29T12:12:12.123456789Z"
},
}
- match: { hits.total: 3 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
date: {
gte: "2018-10-29T12:12:12.987Z",
lte: "2020-10-29T12:12:12.987Z"
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
boolean: {
gte: true
},
}
- match: { hits.total: 2 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
boolean: {
lte: true
},
}
- match: { hits.total: 3 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
boolean: {
lte: true,
gte: false
},
}
- match: { hits.total: 3 }
- do:
search:
rest_total_hits_as_int: true
index: test-doc-values
body:
query:
range: {
boolean: {
lte: false,
gte: true
},
}
- match: { hits.total: 0 }
© 2015 - 2024 Weber Informatics LLC | Privacy Policy