Description
源代码:
List<String> documentIds = (List<String>) requestBody.getOrDefault("documentIds", new ArrayList<>());
Filter.Expression filterExpression = null;
filterExpression = b.in("id", documentIds).build();
经过debug调试后,发现elastic的报错信息是:
ErrorCause@163 "ErrorCause: {"phase":"dfs","failed_shards":[{"shard":0,"index":"my-index","node":"5gGemd0KQeafjhS6eo5CZw","reason":{"type":"query_shard_exception","reason":"Failed to parse query [(metadata.id:[15, 25])]","index_uuid":"70QktWW0T7OhYORdpL1Lsg","index":"my-index","caused_by":{"type":"parse_exception","reason":"Cannot parse '(metadata.id:[15, 25])': Encountered " <RANGE_GOOP> "25 "" at line 1, column 18.\r\nWas expecting:\r\n "TO" ...\r\n ","caused_by":{"type":"parse_exception","reason":"Encountered " <RANGE_GOOP> "25 "" at line 1, column 18.\r\nWas expecting:\r\n "TO" ...\r\n "}}}}],"grouped":true,"type":"search_phase_execution_exception","reason":"all shards failed","root_cause":[{"index_uuid":"70QktWW0T7OhYORdpL1Lsg","index":"my-index","type":"query_shard_exception","reason":"Failed to parse query [(metadata.id:[15, 25])]"}]}"