The invention discloses an SQL use method based on Elasticsearch. The method is used for solving the problems that an existing Elasticsearch query is complex in grammar, not easy to understand semantically, redundant in structure and inconvenient to query, and comprises the following steps: deploying an SQL engine, and enabling a client to receive and transmit queried SQL statements through a Restservice; obtaining a query result from the cache; analyzing the SQL statement through a syntax tree, and constructing a native query syntax of Elasticsearch after the syntax is enhanced. The invention uses a general SQL standard, so that the query availability of Elasticsearch is improved, the use is convenient, the learning cost is low, and the error rate is reduced; grammar enhancement: a rangecan be extracted in a search condition, so that a search result is accurate, synonym conversion is increased, and a search data result can be more comprehensive.