I need access to "gte" and "lte" values on a data mapping with integer_range of my scoreing scripts (Painless)
Try access data with severals methods
doc["trl"].gte.value
doc["trl"].gte
doc["trl"]["gte"].value
doc["trl"]["gte"]
But get error, and for error, I think my error it's I don't know how to access to range data type
"script_stack": [
"org.elasticsearch.index.mapper.MappedFieldType.fielddataBuilder(MappedFieldType.java:107)",
"org.elasticsearch.index.fielddata.IndexFieldDataService.getForField(IndexFieldDataService.java:111)",
"org.elasticsearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:84)",
"org.elasticsearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:81)",
"java.security.AccessController.doPrivileged(Native Method)",
"org.elasticsearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:81)",
"org.elasticsearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:36)",
"gte = doc[\"trl\"].gte.value;\nint ",
" ^---- HERE"
],
"script": "excelle_scoring_01.painless",
"lang": "painless",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "Fielddata is not supported on field [trl] of type [integer_range]"
Data type integer_range
mapping
'trl' => [
'type' => 'integer_range'
],
Response
"trl": {
"gte": 7,
"lte": 9
},