20 questions
0
votes
1
answer
450
views
Handle response from SQL query in Elastic.Clients.Elasticsearch 8.1.0 for .NET
I have an Elasticsearch cluster, which e.g. contains an index called persons. I want to query the documents of the index using the SQL API of Elasticsearch. When using the REST API of Elasticsearch ...
0
votes
1
answer
30
views
ES SQL result doesn't use correct date mapping
I'm experimenting with the SQL options from Elasticsearch and I noticed that a timestamp field that I mapped as "strict_date_optional_time_nanos||epoch_millis" doesn't show up as it is ...
0
votes
1
answer
636
views
elasticsearch SQL query in python
elasticsearch == 7.16.1
Trying to run a very simple query just to try out the SQL implementation w/python.
es.sql.query(body={'query':'select * from index_name-* limit 100'})
Getting this error:
...
1
vote
0
answers
83
views
How to map the result of elasticsearch SQL API request to a java POJO?
I am trying to send SQL queries to elasticsearch server using the SQL API ( I am using the free version so I can't use the JDBC driver they provide)
and I was wondering how I can map the result of the ...
0
votes
0
answers
143
views
Cannot get cardinality count in elasticsearch
I am not able to get cardinality of a field from an elasticsearch index.
The mapping is as follows:
And the query which I am trying to fire is as follows:
--header 'Content-Type: application/json' \
-...
0
votes
1
answer
4k
views
Use query result as parameter for another query in Elasticsearch DSL
I'm using Elasticsearch DSL, I'm trying to use a query result as a parameter for another query like below:
{
"query": {
"bool": {
"must_not": {
"...
2
votes
1
answer
6k
views
Use SQL Access in Elasticsearch python client
I am trying to use the python client for elastic search to query an index using SQL access for elastic search. I want to query an index using sql syntax. How do i specify to elasticsearch that it has ...
0
votes
1
answer
914
views
Elasticserach sql query with passing parameters so we prevent sql Injection
I am using elastic search 7.6.2 version. Passing parameters to a query not working in kibana. When I am trying to add params query not working in kibana dev tool if we try with params query will work ...
1
vote
0
answers
174
views
How to do an Elasticsearch SQL query for geo_point data
I have an ES index which contains a mapping of type geo_point. I want to use the Elasticsearch SQL API to do a bounding box query.
I know how to do this using ES DSL as per the ES docs.
How would ...
1
vote
0
answers
47
views
Filter not equal is it supported in Elasticsearch SQL API
According to Elasticsearch doc it doesn't support arrays in SQL api.
I ended up using filter but it's doesn't work for my case.
include product ids works fine
"body": {
"query" :"...
0
votes
1
answer
495
views
Elasticsearch 7 SQL CLI : ./x-pack-env: No such file or directory error
I have started working on Elasticsearch 7 and trying to start the elasticsearch-sql-cli using the following command:
~/Documents/backups/es7/bin$ ./elasticsearch-sql-cli
But it is not started and ...
0
votes
1
answer
545
views
Parsing error to translate /_sql/translate use UPDATE
I'm using the SQL translator on ElasticSearch on a query that had UPDATE keyword.
I can translate SELECT queries, but UPDATE is not working.
POST /_sql/translate
{
"query": "UPDATE inspections ...
0
votes
4
answers
260
views
SQL like GROUP BY AND HAVING example
I am new to ES and i would need to make a query
Select value
from table
group by value
having count(distinct(id)) > 1
I do not even have areas to start. referencing this SQL like GROUP BY AND ...
0
votes
2
answers
2k
views
sql query translation Query DSL kibana
Please explain the logic of the query translation from sql in kibana console. The most confusing is "order" : "asc", while i request desc.
The numbers "10985", and "11030" also looks very strange. ...
5
votes
2
answers
3k
views
Elasticsearch SQL-Query not possible
I got a ElasticSearch Instance running locally which works fine. Now I want to query an index using SQL. I tried it with the NodeJS-Client (v7) and normally via the REST-Api.
Rest call:
POST http://...
1
vote
1
answer
2k
views
SQL aggregation query corresponding in elasticsearch
I studied elasticsearch aggregation queries but couldn't find if it supports multiple aggregate function. In an other word, I wanna know if elasticsearch can generate the equivalent of this Sql ...
0
votes
1
answer
1k
views
Unable to perform SQL search on logstash index in kibana
I have below indexes in the kibana when searched with below query.
GET /_xpack/sql?format=txt
{
"query": "SHOW tables"
}
Output:
name | type
----------------...
1
vote
1
answer
3k
views
Elasticsearch SQL query in Canvas : it doesn't work like SQL?
I begin to work with the Canvas section in Kibana - and to retrieve data, it uses Elasticsearch SQL.
What I try to do is to retrieve the count of several values ; and I need to group certain values ...
2
votes
3
answers
7k
views
Return all rows in a Elasticsearch SQL query
I have a simple SQL query in Elasticsearch which I know returns less than 100 rows of results. How can I get all these results at once (i.e., without using scroll)? I tried the limit n clause but it ...
0
votes
1
answer
318
views
SQL in query with elastic search sql
I'm trying out elastic search sql. It works fine equal operator in where clause. But I couldn't use in operator in where clause. is there any equivalent command here. (like Terms filter)
POST _xpack/...