Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
update troubleshooting page (#718)
Browse files Browse the repository at this point in the history
  • Loading branch information
chloe-zh authored Aug 28, 2020
1 parent bbbfc75 commit 5a30db2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/user/dql/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,18 @@ Result:

You need to confirm if the syntax is not supported and disable query analysis if that's the case by the following steps:

1. Identify syntax error in failed query, and correct the syntax if the query does not follow MySQL grammar. Go to step 2 if your query is correct in syntax but it still ends up syntax exception.
1. Check if there is any identifier (e.g. index name, column name etc.) that contains special characters (e.g. ".", " ", "&", "@",...). The SQL parser gets confused when parsing these characters within the identifiers and throws exception. If you do have such identifiers, try to quote them with backticks to pass the syntax and semantic analysis. For example, assume the index name in the query above is "sample:data" but the plugin fails the analysis, you may well try:

.. code-block:: JSON
POST /_opendistro/_sql
{
"query" : "SELECT * FROM `sample:data`"
}
Go to the step 2 if not working.

2. Identify syntax error in failed query, and correct the syntax if the query does not follow MySQL grammar. Go to step 3 if your query is correct in syntax but it still ends up syntax exception.

#. Disable strict query analysis in new ANTLR parser with the following code block.

Expand Down

0 comments on commit 5a30db2

Please sign in to comment.