Method and system for querying data by ElasticSearch

A technology for querying data and data, applied in the field of data query, can solve the problem that ElasticSearch paging query cannot obtain the query result set, etc., and achieve the effect of reducing long-term occupation and significant effect
CN112100247AActive Publication Date: 2020-12-18壹药网科技(上海)股份有限公司

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
壹药网科技(上海)股份有限公司
Publication Date
2020-12-18

Smart Images

  • Figure 1
    Figure 1
Patent Text Reader

Abstract

The invention relates to the technical field of data query, and discloses a method and a system for querying data by ElasticSearch. The problem that the query result set cannot be obtained through ElasticSearch paging query when the query result set is very large can be solved. The method comprises the steps: carrying out query according to parameters of a query request, and obtaining the total number of data of a query result set; determining a paging size according to the total number of the data; querying specified identifiers of single data at specified positions sorted according to the specified identifiers in the query result set according to the paging size so as to determine a starting condition and an ending condition of the Nth page, and performing single-page query in a Scoll mode according to the starting condition and the ending condition of the Nth page and parameters of the query request to obtain all data of the Nth page, not maintaining a global sorting result of global sorting according to the parameters of the query request and the specified identifier in the single-page query; and combining the queried data of each page and performing returning.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present disclosure relates to the technical field of data query, in particular to ElasticSearch technology. Background technique

[0002] Elasticsearch is a Lucene-based search service that provides an enterprise-level full-text search engine with distributed multi-user capabilities. Elasticsearch is often used in cloud computing, which can realize real-time search, is stable, reliable, fast, and easy to install and use. ElasticSearch can be used to search various documents, and can realize fast and efficient query and aggregation of large amounts of data. The data in Elasticsearch is stored in shards. When performing a search, each shard is searched independently, and the data is then integrated and returned.

[0003] Elasticsearch's paging query includes From-Size mode and Scroll mode.

[0004] From-Size mode can be understood as paging in a simple sense, where From defines the offset value of the target data, and Size defines the number of cu...

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