SQL use method based on Elasticsearch

A user and grammar technology, applied in the field of SQL query, can solve the problems of Elasticsearch query syntax complex, difficult to understand semantics, inconvenient query operation, etc., to achieve comprehensive search data results, improve query usability, and low learning costs.

Active Publication Date: 2020-11-24
ANHUI XINHUABO INFORMATION TECH
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] The purpose of the present invention is to propose a SQL usage method based on Elasticsearch in order to solve the problems that the existing Elasticsearch query syntax is complex, semantically difficult to understand, redundant in structure, and inconvenient for query operations; the syntax tree is the abstract syntax of SQL The tree-like representation of the structure, each node on the tree represents a structure in SQL, adopts the general SQL standard, improves the query availability of Elasticsearch, is easy to use, has low learning costs, and reduces the error rate; syntax enhancement: in the search condition The scope can be extracted to make the search results accurate and increase the conversion of synonyms, which can make the search data results more comprehensive;

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • SQL use method based on Elasticsearch
  • SQL use method based on Elasticsearch

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0041] The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Apparently, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0042] see Figure 1-2 As shown, an Elasticsearch-based SQL usage method includes the following steps:

[0043] Step 1: Deploy an SQL engine, and the client receives the SQL statement for passing the query through the Rest service;

[0044] Step 2: Obtain query results from the cache; the cache is implemented based on Ehcache;

[0045] Step 3: Parse the SQL statement through the syntax tree. After the syntax is enhanced, construct the native query syntax of Elasticsearch;

[0046] Step 4: Obtain the Elasticsearch query r...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

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.

Description

technical field [0001] The invention relates to the technical field of SQL query, in particular to an Elasticsearch-based SQL usage method. Background technique [0002] Elasticsearch is a full-text search engine built on Apache Lucene TM The base search engine is a real-time distributed search and analysis engine. [0003] Elasticsearch is also written in Java. It uses Lucene for indexing and searching internally, but its purpose is to make full-text search easy by hiding the complexity of Lucene. [0004] There are many communication methods for Elasticsearch, one is to communicate through the RESTful web interface, and the other is to communicate through the Java API to query related data. [0005] Operating Elasticsearch through the java API has high requirements for the technology stack and increases the cost of learning. To realize the query function, a large amount of code needs to be written to complete. When the version changes, the code needs to be refactored, ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/2452G06F16/2455G06F16/248G06F3/01G06K9/00G06F40/109
CPCG06F16/24526G06F16/24552G06F16/248G06F3/013G06F40/109G06V40/193
Inventor 任新华涂天佑
Owner ANHUI XINHUABO INFORMATION TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products