Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A method of retrieving ElasticSearch based on SQL

A search method and query language technology, which is applied in the field of confidential or secure communication devices, can solve problems such as increased system overhead, burden on developers and application program upgrades, and easy compatibility problems, so as to reduce system overhead, improve performance, and solve problems. The effect of high concurrency

Active Publication Date: 2019-01-04
HANGZHOU ANHENG INFORMATION TECH CO LTD
View PDF5 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The technical problem solved by the present invention is that in the prior art, because TransportClient uses TransportProtocol to communicate with ElasticSearch, when the versions of TransportClient and ElasticSearch instances are inconsistent, it is very easy to have compatibility problems, which brings a burden to developers and application program upgrades, and because TransportClient adopts the long connection method, which will also increase the overhead of the system. The present invention provides an optimized method for retrieving ElasticSearch based on SQL

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0035] The present invention will be described in further detail below in conjunction with the examples, but the protection scope of the present invention is not limited thereto.

[0036] The invention relates to a method for retrieving ElasticSearch based on SQL, and the method includes the following steps.

[0037] Step 1: Create a database connection pool.

[0038] In step 1, a database connection pool is created with Druid.

[0039] In the present invention, Druid is an open source, efficient and manageable database connection pool component. The Druid database connection pool is established to create multiple RestClient connections, which can execute different SQL commands at the same time, thereby solving the high concurrency problem.

[0040] Step 2: Establish SQL semantics.

[0041] Step 3: Enter Structured Query Language SQL.

[0042] In the present invention, the structure of the structured query language SQL is well known to those skilled in the art, for example,...

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 relates to a method for retrieving ElasticSearch based on SQL. The method comprises steps: creating a Database Connection Pool, parsing the input SQL language, establishing a correspondence with ElasticSearch and splicing the parsed query language into query statements for ElasticSearch, RestClient being used to establish database connection with database connection pool and sendingretrieval request to ElasticSearch to convert the returned result to standard output. The present invention does not have compatibility problems due to ElasticSearch version updates, RestClient uses application layer http to call transport layer tcp to complete operation, reduces system overhead and improves performance. Database connection pool can meet the needs of creating multiple RestClient connections, and execute different SQL at the same time to solve the high concurrency problem.

Description

technical field [0001] The invention relates to the technical field of confidential or secure communication devices, in particular to a method for retrieving ElasticSearch based on SQL. Background technique [0002] ElasticSearch is an open source, Lucene-based search server that provides a distributed multi-user capable full-text search engine. In the big data industry, the distributed retrieval function of ElasticSearch is convenient for multi-dimensional data presentation, analysis, and prediction, which is conducive to the value of data. In China, many large companies, such as Massive, Ctrip, Sina, Baidu, etc., use ElasticSearch for search and analysis. [0003] At present, the function of ElasticSearch is mostly used for retrieval. As a popular enterprise-level search engine, ElasticSearch can solve many people's requirements for search. It uses JSON for data indexing through HTTP and does not support SQL. Therefore, in terms of using ElasticSearch for query, most peo...

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
IPC IPC(8): G06F16/24G06F16/245
Inventor 徐思奥范渊龙文洁刘博
Owner HANGZHOU ANHENG INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products