Patent ID: 11914592
Assignee: ELASTICSEARCH B.V.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 8:
9. A method for processing structured queries over clusters, the method comprising:
receiving, by a local cluster of the plurality of clusters and from a client, a structured query language (SQL) structured query;
determining, by the local cluster and based on the SQL structured query, a list of remote clusters of the plurality of clusters, the remote clusters being configured to process the SQL structured query;
processing, by the local cluster, the SQL structured query to generate a local query executable by a local search engine of the local cluster and remote queries executable by remote search engines of the remote clusters;
prior to executing the local query, optimizing, by the local cluster, the local query;
prior to sending the remote queries, optimizing, by the local cluster, at least one of the remote queries, wherein optimizing at least one of the local query or the at least one remote query includes one or more of the following:
replacing, in the local query or the at least one remote query, a first field search operator having a first regular expression with a field exist operator, if the first regular expression matches all possible word entities; and
replacing, in the local query or the at least one remote query, a second field search operator having a second regular expression with a field exist operator, if the second regular expression does not include a pattern;

sending, by the local cluster, the remote queries to the remote clusters to obtain remote results;
execute, by the local cluster and using the local search engine, the local query to obtain local results;
combining, by the local cluster, the remote results and the local results to obtain an aggregated result; and
returning, by the local cluster, the aggregated result to the client.