Invalid index name [_sql]
Unable to make a query.
My ElasticSearch version is 1.4.1
What is the query you were trying to make?
Simple match_all query
Le Wed Jan 07 2015 at 19:03:52, Omer Shelef [email protected] a écrit :
What is the query you were trying to make?
— Reply to this email directly or view it on GitHub https://github.com/NLPchina/elasticsearch-sql/issues/29#issuecomment-69063303 .
"SELECT * FROM [myindex] LIMIT 100;"
Le Thu Jan 08 2015 at 21:55:38, Thierry LEFORESTIER [email protected] a écrit :
Simple match_all query
Le Wed Jan 07 2015 at 19:03:52, Omer Shelef [email protected] a écrit :
What is the query you were trying to make?
— Reply to this email directly or view it on GitHub https://github.com/NLPchina/elasticsearch-sql/issues/29#issuecomment-69063303 .
Elasticsearch-sql use MySQL dialect. square brackets is invalid in MySQL. if your index name is "myindex" just drop the brackets:
SELECT * FROM myindex
if your index name is "[myindex]". use backticks:
SELECT * FROM `[myindex]`
Quoting doesn't seem to help (ES version 1.4.2) My query is:
SELECT * FROM `test_1`
and the result is always the same (with and without quotes):
{"error":"InvalidIndexNameException[[_sql] Invalid index name [_sql], must not start with '_']","status":400}
What version of elasticsearch-sql are you using?
1.2
I didn't set bracket, it was just to give the index example ^^. Sorry
Le Fri Jan 16 2015 at 10:54:59, Ville-Matti Riihikoski < [email protected]> a écrit :
1.2
— Reply to this email directly or view it on GitHub https://github.com/NLPchina/elasticsearch-sql/issues/29#issuecomment-70231257 .
I am trying to reproduce your problem. I installed elasticsearch 1.4.2 and elasticsearch-sql 1.2. but it seems to working fine on my computer. according to the error it seems that elasticsearch trying to query on index named "_sql" instead of the "test_1"...
Are you trying to query using the web frontend or the rest api? if you are using rest, what is the exact url you used?
what operating system are you using? what java version?
EDIT: I managed to reproduce the problem. using POST request when elasticsearch-sql not installed will cause this error. I assume you query through the web frontend, so maybe The plugin was not installed correctly. open the elasticsearch folder, plugins/sql. it should contains elasticsearch-sql-1.2.jar and _site folder. maybe the jar is missing? if the answer is yes, try to remove this folder, and reinstall.
Yes. I was using web frontend and the jar was missing. Re-installed and now everything is working as expected. Thank you for a great plugin
Happy to help. Do you have any idea why this jar was missing? you installed the plugin in a different way?
Unfortunetly I don't. I used the one liner from the frontpage to install.
Hi, i'm also experiencing this error, although in my sql plugin folder the .jar file exists.
/usr/share/elasticsearch/plugins/sql# ls _site elasticsearch-sql-1.3.jar
I'm using ElasticSearch 1.4.2 and the 1.3 version of the plugin. Do you have any idea how I could get to fix this? Thanks!!
Hi,
The same problem. File elasticsearch-sql-1.3.1.jar exists.
Error message: Error: {"error":"InvalidIndexNameException[[_sql] Invalid index name [sql], must not start with '']","status":400}
I tried ElasticSearch 1.4.4 and 1.5.0 - result is the same.
Additional info: OS - Centos 6.5 Java - Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Thank you, Taras
Elasticsearch 2.3.1
./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.3.1.0/elasticsearch-sql-2.3.1.0.zip After doing this, you need to restart the Elasticsearch server. Otherwise you may get errors like Invalid index name [sql], must not start with '']; ","status":400}.