Hi guys, I am writing to make this query on how to set the aliases in the ES queries. since I want to implement the conversion from SQL to ES through a PHP plugin in development. For the application to be implemented, it has many aliases established in its SQL and JOIN queries. For the JOIN we will denormalize the structure in the actions of INSERT and UPDATE by establishing the document with all its related information. But now the problems present are the aliases that have thousands of SQL queries. Any idea how to set such aliases in ES.
Example:
POST /_sql/translate
{
"query": "SELECT id AS IID FROM gic_category WHERE IID != 1 ORDER BY IID DESC LIMIT 1"
}
On the methods of time what would be your conversion into ES?
(UNIX_TIMESTAMP(DATE_ADD(`date`, INTERVAL `period` DAY)) > UNIX_TIMESTAMP(NOW())
How can I set the range against an existing fields in the same document?
GET my_index/_search
{
"query": {
"range" : {
"date" : {
"gte" : "now-[period]d/d",
"lte" : "now/d"
}
}
}
}