Questions tagged [elasticsearch-template]
49 questions
1
vote
1 answer
ElasticSearch. How to pass array to the search template
I have a search system in which i need to score by location. User sends his coordinates, I check whether they intersect with pre-indexed polygons. The problem is I don't know how to pass coordinates to json file. I use python library called…

Zhanara
- 107
- 2
- 8
1
vote
1 answer
Date Range Query using SearchTemplate in Elasticsearch with Should clause
We have a scenario where we have to do range query with "OR" condition.
It is working fine, with one query, but getting error while triggering with multiple query.
POST _scripts/dateTemplate
{
"script": {
"lang": "mustache",
"source":…

User1203
- 77
- 2
- 11
1
vote
0 answers
Elasticsearch template unable to read underscore in ids
Here is my query template which is mustache-
{\"query\":{\"ids\":{\"type\":\"component\",\"values\":[{{#id_list1}}{{value}}{{#comma}},{{/comma}}{{/id_list1}}]}},\"size\":{{#size}}{{size}}{{/size}}{{^size}}200{{/size}}}{{/id_list}}
In values when I…

Ravinder Baid
- 395
- 1
- 15
1
vote
0 answers
elasticsearch mapping for timeseries
We are planning to use elasticsearch as timeseries database for our metric store. After going through the following blog (https://www.elastic.co/blog/elasticsearch-as-a-time-series-data-store) on elasticsearch as timeseries database, i came up with…

Maddy_15
- 61
- 5
1
vote
1 answer
Elasticsearch: Indexing tweets - mapping, template or ETL
I am about to index tweets coming from Apache NiFi to Elasticsearch as POST and want to do the following:
Make create_at field as date. Should I use mapping or index template for this?
make some fields not analyzed. Like hashtags, URLs, etc.
Want…

Igor K.
- 915
- 2
- 12
- 22
1
vote
1 answer
Elasticsearch : Javascript how to search with file template
I've create an search template in a mustache file and place it on /config/scripts.
I'm able to do a java search with this template by specifiing the templateType
SearchResponse sr =…

Alexandre Girard
- 11
- 1
1
vote
3 answers
Elasticsearch indexed search template generates empty strings in array
First of all, this is taken from documentation:
Passing an array of strings
GET /_search/template
{
"template": {
"query": {
"terms": {
"status": [
"{{#status}}",
"{{.}}",
"{{/status}}"
]
…

Evaldas Buinauskas
- 13,739
- 11
- 55
- 107
0
votes
0 answers
Using PutComposableIndexTemplateRequest in Custom Plugin
I have been working on a custom Elasticsearch plugin that should create an index template and its components when an Elasticsearch instance loads this plugin.
The only client that I can access is NodeClient and there is no way to create…

Murat
- 79
- 2
- 10
0
votes
0 answers
Kibana: Accessing booleans in Stored Script
I'm using Kibana Stored Scripts and Search Templates to fetch data.
I have a request to power the Stored Script using a boolean sent through the Search Template.
Requirement
My ask is:
Use a parameter includeABC to fetch all docs which have…
0
votes
1 answer
Can we create template in elastic search autoatically for new index pattern?
We have a index pattern filebeat-7.10.2* and we have template for this.
Now I want a template created automatically for index filebeat-8.6.0.
Is it possible?

Poonam Agrawal
- 272
- 4
- 16
0
votes
1 answer
Spring-data-elastic and get "_index" value
We are slowly moving our project away from the RestHighLevelClient onto Spring's Api Client. In doing so it looks as though some of the metadata is not coming back as expected.
Here's our simplified POJO:
public class TestDocument {
…

Dan
- 979
- 1
- 8
- 29
0
votes
1 answer
OpenSearch - Can you run calculations on parameters in search template?
Is it possible to run calculations on parameters inserted into your search function?
For example,
col_name_value = "10" and i want to match on values of 100.
"match": {
"column_name": {
"query":…

James Burton
- 37
- 6
0
votes
0 answers
Computing Aliases while creating the Index Template in Elastic Search 8.x
I have created the index template in elastic search 8.5.3. Here, I need the alias creation with a dynamic name.
For example, if the index name is, es.contact100 then the alias should be as.contact100.model.
I used this one,
{ "as-{index}": {} }
But,…

bala n
- 61
- 6
0
votes
0 answers
Elasticsearch searchtemplate in spring webflux in JAVA
How to implements the Elasticsearch searchtemplate in spring webflux and how to get the response of the searchtemplate() or data from Flux in JAVA API
SearchTemplateRequest request = new…
0
votes
1 answer
Elasticsearch java pagination not working
I am trying to fetch all data from elastic index with scroll id.
SearchQuery searchQuery = new NativeSearchQueryBuilder()
.withIndices(ELASTIC_INDEX)
.withTypes(DOC_TYPE)
…

mahfuj asif
- 1,691
- 1
- 11
- 32