IP Library Granted Patent US 11,188,531
Granted Patent B2
US 11,188,531 · App. 15/906,824 · Granted Nov 30, 2021

Systems and methods for converting and resolving structured queries as search queries

Inventor: Stefan Costin Leau (Bucharest, RO)
Assignee: Elasticsearch B.V.
G06F16/24534G06F16/2246G06F16/2433G06F16/258G06F16/30
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,188,531
App. No.
15/906,824
Granted
Nov 30, 2021
Kind
B2
Abstract

Systems and methods for processing structured queries as search queries are provided herein. An example system includes a structured query language (SQL) parser that parses a SQL structured query into a tree structure; an analyzer module that generates a logical plan from the tree structure; a planner module that generates an optimized logical plan from the logical plan; and an execution module that: generates a physical plan from the optimized logical plan, the physical plan comprising a search query that can be executed by a search engine; and returns results of the search query to a client.

Claims (46)

1. A distributed, multi-tenant search and analytics document search engine system that converts and processes structured queries as search queries, the system comprising:

a structured query language (SQL) parser that parses a SQL structured query into a tree structure;

an analyzer module configured to:

semantically analyze the tree structure;

semantically validate components of the SQL structured query;

resolve the components of the SQL structured query;

generate a resolved logical plan from the tree structure using aliasing of at least a portion of the components of the SQL structured query; and

resolve hidden references in the SQL structured query, the hidden references being available but being filtered by intermediate levels of processing;

a planner module that generates an optimized logical plan from the resolved logical plan; and

an execution module that:

generates a physical plan from the optimized logical plan, the physical plan comprising a search query that can be executed by a search engine to perform retrieval, search, filtering and aggregation, wherein the search query has a higher specificity than the SQL structured query; and

returns results of the search query to a client.

2. The distributed, multi-tenant search and analytics document search engine system according to claim 1 , wherein the planner module generates the optimized logical plan from the resolved logical plan by performing any of operator pruning and execution elimination.

3. The distributed, multi-tenant search and analytics document search engine system according to claim 1 , wherein the physical plan comprises automatically generated executable code that can be executed by a search engine to perform search, filtering, and aggregations and to resolve the SQL structured query.

4. The distributed, multi-tenant search and analytics document search engine system according to claim 1 , wherein the system performs a distributed full text search of resources using the physical plan that is based on the SQL structured query and the results include data obtained from the full text search.

5. A distributed, multi-tenant search and analytics document search engine system, the system comprising:

a processor; and

a memory for storing executable instructions, the processor executing the instructions to:

allow a user to input a structured query language (SQL) request including a SQL query;

parse the SQL query into a tree structure;

validate components of the SQL query, so as to ensure that the components are syntactically valid;

semantically resolve the components of the SQL query, so as to ensure that the components are semantically valid;

generate a resolved logical plan from the tree structure using aliasing of at least a portion of the components of the SQL query;

resolve hidden references in the SQL query, the hidden references being available but being filtered by intermediate levels of processing;

convert the SQL request into a physical plan comprising a search query that can be executed by a search engine using pattern matching implemented as a rule set, wherein the search query has a higher specificity than the SQL request;

perform a retrieval, search, filtering and aggregation query using the physical plan to produce results; and

return a response to the SQL request based on the results of the retrieval, search, filtering and aggregation query.

6. A method for a distributed, multi-tenant search and analytics document search engine system that converts and processes structured queries as search queries, the method comprising:

receiving a structured query language (SQL) query from a user, the structured query language (SQL) being ANSI SQL;

converting the SQL query to an executable search query by:

parsing the SQL query into a tree structure;

validating components of the SQL query, so as to ensure that the components are syntactically valid;

semantically resolving the components of the SQL query, so as to ensure that the components are semantically valid;

generating a resolved logical plan from the tree structure by semantically analyzing the tree structure and using aliasing of at least a portion of the components of the SQL query;

resolving hidden references in the SQL query, the hidden references being available but being filtered by intermediate levels of processing;

generating an optimized logical plan from the resolved logical plan; and

generating a physical plan from the optimized logical plan, the physical plan being folded into a search query that can be executed by a search engine to perform retrieval, search, filtering and aggregation,

wherein the search query has a higher specificity than the SQL query;

wherein the search query has a higher granularity than the SQL query; and

wherein the search query includes a Domain Specific Language (DSL); and

returning results of the search query to a client.

7. The method according to claim 6 , wherein the generating the optimized logical plan from the resolved logical plan comprises performing any of operator pruning and execution elimination.

8. The method according to claim 6 , wherein the physical plan comprises automatically generated executable code that can be executed by a search engine to resolve the SQL query.

9. The method according to claim 8 , further comprising performing a distributed full text search of resources using the physical plan that is based on the SQL query and the results include data obtained from the full text search.

10. The method according to claim 6 , wherein the converting the SQL query to the executable search query further comprises mapping components of the SQL query into a logical algebraic expression of the tree structure and translating the logical algebraic expression of the tree structure into a physical algebraic expression, the physical algebraic expression being an executable instruction set.

11. The method according to claim 6 , wherein the search query is executed over a non-relational database.

Assignments (2)
CHANGE OF NAME Recorded Apr 6, 2021
From: ELASTICSEARCH B.V.
To: ELASTICSEARCH B.V.
Reel/Frame 055843/0215 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 31, 2018
From: LEAU, STEFAN COSTIN
To: ELASTICSEARCH B.V.
Reel/Frame 045954/0489 →
Continuity (1)
Related Publication 20190266271A1 · Aug 29, 2019
Cited By (1)
US 12,499,164