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

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

Active Publication Date: 2020-12-18
壹药网科技(上海)股份有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The purpose of this disclosure is to provide a ElasticSearch query data method and its system, which can solve the problem that the ElasticSearch pagination query cannot obtain the query result set when the result set is large, and in the query process, most of the time does not need to maintain the query Global sorting results for result sets

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
  • Method and system for querying data by ElasticSearch

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] In the following description, many technical details are proposed for readers to better understand the present disclosure. However, those skilled in the art can understand that without these technical details and various changes and modifications based on the following implementation modes, the technical solutions claimed in the present disclosure can also be realized.

[0046] In order to make the purpose, technical solution and advantages of the present disclosure clearer, the implementation manners of the present disclosure will be further described in detail below in conjunction with the accompanying drawings.

[0047] The first embodiment of the present disclosure relates to a method for querying data by ElasticSearch.

[0048] The ElasticSearch service runs on the server, and the server stores a large amount of data for the ElasticSearch service to query, and each piece of data has a designated identifier (the designated identifier referred to in each embodiment o...

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 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.

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

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/2458G06F16/2453
CPCG06F16/24532G06F16/2471
Inventor 武磊于刚
Owner 壹药网科技(上海)股份有限公司
Features
  • Generate Ideas
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More