I managed query Elasticsearch using curl and got some more info.
{
"error" : {
"root_cause" : [
{
"type" : "script_exception",
"reason" : "runtime error",
"script_stack" : [
"org.elasticsearch.index.mapper.TextFieldMapper$TextFieldType.fielddataBuilder(TextFieldMapper.java:814)",
"org.elasticsearch.index.fielddata.IndexFieldDataService.getForField(IndexFieldDataService.java:109)",
"org.elasticsearch.index.query.SearchExecutionContext.lambda$lookup$2(SearchExecutionContext.java:503)",
"org.elasticsearch.search.lookup.SearchLookup.getForField(SearchLookup.java:105)",
"org.elasticsearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:72)",
"org.elasticsearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:69)",
"java.base/java.security.AccessController.doPrivileged(AccessController.java:318)",
"org.elasticsearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:69)",
"org.elasticsearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:27)",
"doc['sentence_text'].length() > params.min_length",
" ^---- HERE"
],
"script" : "doc['sentence_text'].length() > params.min_length",
"lang" : "painless",
"position" : {
"offset" : 4,
"start" : 0,
"end" : 49
}
}
],
"type" : "search_phase_execution_exception",
"reason" : "all shards failed",
"phase" : "query",
"grouped" : true,
"failed_shards" : [
{
"shard" : 0,
"index" : "conc",
"node" : "UGH_0oVATf6s32PygGpEgg",
"reason" : {
"type" : "script_exception",
"reason" : "runtime error",
"script_stack" : [
"org.elasticsearch.index.mapper.TextFieldMapper$TextFieldType.fielddataBuilder(TextFieldMapper.java:814)",
"org.elasticsearch.index.fielddata.IndexFieldDataService.getForField(IndexFieldDataService.java:109)",
"org.elasticsearch.index.query.SearchExecutionContext.lambda$lookup$2(SearchExecutionContext.java:503)",
"org.elasticsearch.search.lookup.SearchLookup.getForField(SearchLookup.java:105)",
"org.elasticsearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:72)",
"org.elasticsearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:69)",
"java.base/java.security.AccessController.doPrivileged(AccessController.java:318)",
"org.elasticsearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:69)",
"org.elasticsearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:27)",
"doc['sentence_text'].length() > params.min_length",
" ^---- HERE"
],
"script" : "doc['sentence_text'].length() > params.min_length",
"lang" : "painless",
"position" : {
"offset" : 4,
"start" : 0,
"end" : 49
},
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [sentence_text] in order to load field data by uninverting the inverted index. Note that this can use significant memory."
}
}
}
]
},
"status" : 400
}