25 questions
0
votes
1
answer
603
views
How to iterate through aggregation buckets and send mail corresponding to each bucket using watcher action
I am trying to iterate through the aggregation bucket results. The aggregation response is :
"aggregations" : {
"agg1" : {
"doc_count_error_upper_bound" : 0,
...
2
votes
1
answer
1k
views
ElasticSearch exact match on text field with script
I'm trying to search with an ElasticSearch query documents that have exactly a certain value in a text field. I know that with a term query it could be possible if it were a keyword field. ...
0
votes
1
answer
2k
views
cannot convert MethodHandle(Dates)JodaCompatibleZonedDateTime to (Object)double
I am trying to add conditions if field exist, then sort according to it otherwise use another field. Since one of either will exist.
Here is my query:
GET /my_index/_search
{
"query": {
...
0
votes
1
answer
375
views
Best practice to do customized mapping in Elasticsearch aggregation
I want to carry out a customized aggregation through mapping a certain field in ES doc.
I try to leverage terms aggregation script. There're hundreds of mappings so that I have to put all of them into ...
2
votes
2
answers
1k
views
Select documents by array of objects when at least one object doesn't contain necessary field Elasticsearch
I have documents in the elasticsearch and can't understand how to apply search script that should return documents if any attachment doesn't contain uuid or uuid is null. Version of elastic 5.2.
...
0
votes
0
answers
340
views
How to significantly minimize the elasticsearch query execution time of the query that has aggregation with script
I have around 17 million documents(Its gradually increasing) in the elastic-search index,
Mapping of one of the property labels that is used for aggregation is
{
"mappings":{
"...
1
vote
2
answers
2k
views
Elasticsearch update nested field with painless script in ElasticSearch API vs java API
Could someone explain what's wrong with ES java api?
I'm making query to update by script with ES api and it works perfectly (below)
POST user/ut/520411_5752/_update
{
"script": {
&...
1
vote
1
answer
287
views
How do I aggregate a bit field in Elasticsearch?
I have a 60-bit (minutes in an hour) field that I would like to aggregate with a bit-wise or operator so that the end result is a bit set if any of the contributing values had that bit set.
The ...
0
votes
1
answer
275
views
Elasticsearch scripting array size
Can anyone help me to construct below query. I get below error, when running this query. ES version is 7.9.0;
In my model there is a field "repliedBy" which is an array field. It's value is ...
0
votes
1
answer
333
views
How to concatenate a Object instead whole them replace using Update API (painless) on write ElasticSearch
Scenario: have a document A on ElasticSearch and I want concatenate on this document some fields existing on document B.
Document A:
{
"id": 121423,
"name": "Sample ...
1
vote
1
answer
1k
views
Extract date (yyyyMMdd) from date field in ElasticSearch query
My index has a date field formatted as 2020-01-04T05:00:06.870000Z. In the ES query response, I need the date in the form yyyyMMdd, so 20200104. I tried using scripted query and extracted the day, ...
1
vote
0
answers
67
views
Scripting in elasticsearch
I have a couple of questions about scripting in elasticsearch, I hope someone can help me. I need to add several parameters from the document to _score and sort by the total value. First, I will ...
0
votes
1
answer
200
views
Elasticsearch: Aggregation For Random Fields
enter image description here
Now I have a document like the picture. The Structure of this document is "contents" field with many random key field(Notice that there isn't a fixed format for ...