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

Elasticsearch query data method and its system

A technology for querying data and data, applied in the field of data query, can solve the problem that ElasticSearch paging query cannot obtain query result sets, etc., and achieve the effect of reducing long-term occupation and significant effect

Active Publication Date: 2021-02-02
壹药网科技(上海)股份有限公司
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
  • Elasticsearch query data method and its system

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 present disclosure relates to the technical field of data query, and discloses a method and system for querying data by ElasticSearch. It can solve the problem that the ElasticSearch paging query cannot obtain the query result set when the query result set is large. The method includes: querying according to the parameters of the query request to obtain the total number of data pieces in the query result set; determining the page size according to the total number of data pieces; querying the specified identifier of a single piece of data in the query result set sorted by the specified identifier according to the page size , to determine the start condition and end condition of page N, and according to the start condition and end condition of page N and the parameters of the query request, perform a single page query through Scroll mode to get all the data of page N, in this single page The page query does not maintain the global sorting results according to the parameters of the query request and the global sorting of the specified identifier; the data obtained by each page query is combined and returned.

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
Patent Type & Authority Patents(China)
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