Elasticsearch Error building the query by Siddhi himself

16 views
Skip to first unread message

Antonio Moreno Borras

unread,
Sep 24, 2020, 10:29:42 AM9/24/20
to siddhi-dev
I have installed the Elasticsearch extension and when Siddhi connects and tries to do a query to retrieve information from an Elasticsearch index, this error occurs when Siddhi itself builds the query to Elastic:

Suppressed: org.elasticsearch.client.ResponseException: method [POST], host [http://192.168.168.88:9200], URI [/financial_fraud/_search?typed_keys=true&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&search_type=query_then_fetch&batched_reduce_size=512&ccs_minimize_roundtrips=true], status line [HTTP/1.1 400 Bad Request]  

{"error":{"root_cause":[{"type":"query_shard_exception","reason":"Failed to parse query [(OR )]","index_uuid":"rOYJ36MURW-OSoH7lzjTOg","index":"index1"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"index1","node":"vjPTcHUBSjK2si-zvnxW4g","reason":{"type":"query_shard_exception","reason":"Failed to parse query [(OR )]","index_uuid":"rOYJ36MURW-OSoH7lzjTOg","index":"index1","caused_by":{"type":"parse_exception","reason":"Cannot parse '(OR )': Encountered \" <OR> \"OR \"\" at line 1, column 1.\nWas expecting one of:\n <NOT> ...\n \"+\" ...\n \"-\" ...\n <BAREOPER> ...\n \"(\" ...\n \"*\" ...\n <QUOTED> ...\n <TERM> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n <REGEXPTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n <TERM> ...\n ","caused_by":{"type":"parse_exception","reason":"Encountered \" <OR> \"OR \"\" at line 1, column 1.\nWas expecting one of:\n <NOT> ...\n \"+\" ...\n \"-\" ...\n <BAREOPER> ...\n \"(\" ...\n \"*\" ...\n <QUOTED> ...\n <TERM> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n <REGEXPTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n <TERM> ...\n "}}}}]},"status":400}  

It was Siddhi itself who creates the query.

Best regards
Reply all
Reply to author
Forward
0 new messages