Questions tagged [elasticsearch-api]

Elasticsearch is a search server based on Lucene.

Elasticsearch is a search server based on Apache Lucene. It provides a distributed, multitenant-capable full-text search engine with a RESTful web interface and schema-free JSON documents. Elasticsearch is developed in Java and is released as open source under the terms of the Apache License. Elasticsearch is the second most popular enterprise search engine.

56 questions
1
vote
1 answer

Elasticsearch aggregation over timestamp

I'm having the following document in ElasticSearch: "ipAddress": "192.168.10.12", "timestamp": "25 Oct 2015 20:00:00", "switchovers": 2 "ipAddress": "192.168.10.12", "timestamp": "26 Oct 2015 20:00:00", "switchovers": 1 How can I write an…
Skanda Nag
  • 13
  • 1
  • 3
1
vote
1 answer

Elasticsearch Ordering terms aggregation buckets after field in top hits sub aggregation

I would like to order the buckets from a terms aggregation based on a property possessed by the first element in a top hits aggregation. My best effort query looks like this (with syntax errors): { "aggregations": { "toBeOrdered": { …
Bomaz
  • 1,871
  • 1
  • 17
  • 22
1
vote
1 answer

How to get nested types in Elasticsearch

I have the following document: { "_index" : "testdb", "_type" : "artWork", "_id" : "0", "_version" : 4, "found" : true, "_source":{"uuid":0, "StatusHistoryList":[ { …
swaheed
  • 3,671
  • 10
  • 42
  • 103
0
votes
1 answer

Deleting source index after using the clone API possible?

The elastic clone api (https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clone-index.html) states Cloning works as follows: First, it creates a new target index with the same definition as the source index. Then it hard-links…
m_c
  • 59
  • 1
  • 9
0
votes
0 answers

Any way to implement Token base (JWT) authentication in basic license of Elasticsearch

We are using basic license of Elasticsearch 8.7.1 and want to implement JWT authentication, but when we add Realm for JWT authentication using token type = access-token getting following warning in log file: [WARN ][o.e.x.s.a.RealmsAuthenticator]…
0
votes
0 answers

Drupal 8 - Search with decimal number and percentage sign is not working

In the node, I have a title which has 66.7% number in it ,and I have enable fulltext searh in the node title, but still I am not getting any result when I search with exact number 66.7% Enable search in the content type. Allow it in search API and…
0
votes
1 answer

Why are aliases not removed (but adding them works fine)?

I send the following request to ES: PUT /_alias { "actions": [ { "remove": { "index": "iso27001-controls-followup-1678369933360", "alias": "iso27001-controls-followup-current" } }, { "remove": { …
WoJ
  • 27,165
  • 48
  • 180
  • 345
0
votes
2 answers

Elasticsearch query different fields with different weight

Say I have 3 different fields, A of text type, B of int type, C of date type. I other query conditions for all 3 fields. In addition to this, I want to give more weightage to field C then B then A. ie A is looking for text having word 'xyz' and it…
ashfak
  • 75
  • 8
0
votes
1 answer

Elastic ExistsRequst for field value and field type

I'm working on a project creating integration tests and the data I have includes all the schema updates people have done in the past. For example My "documents" field has a property of user, which has been an array in the past, but is now an…
Dan
  • 979
  • 1
  • 8
  • 29
0
votes
1 answer

Elasticsearch Search Query using python subprocess: Illegal Argument Exception

I am trying to run a curl command using the run command in the subprocess module in python. But it is failing. However, the curl command for my elasticsearch search query API is working fine- curl -k XGET -H "Content-Type: application/json" -H…
0
votes
1 answer

Ingesting / enriching / transforming data in one elasticsearch index with dynamic information from a second one

I would like to dynamically enrich an existing index based on the (weighted) term frequencies given in a second index. Imagine I have one index with one field I want to analyze (field_of_interest): POST test/_doc/1 { "field_of_interest": "The…
0
votes
1 answer

Elastic Search Aggregation query parameter to visualize bar chart

So I want to create a bar chart to display all the "name" fields of all the animal groups in the x-axis and its total "value" field in the y-axis(or vice-versa) from now to 6 months before. What will the query parameter be for this? Couldn't seem to…
0
votes
2 answers

When changing the index of an Elasticsearch alias via API, do write operations immediately point to the right index after the response?

Let's say I got the alias car-alias pointing to car-index-1. I now want car-alias to point to car-index-2. I therefore perform the following POST request to the Aliases API: { "actions": [ { "remove": { "index": "car-index-1", …
Harold L. Brown
  • 8,423
  • 11
  • 57
  • 109
0
votes
1 answer

ElasticSearch _find method to get saved objects returning "not handler found for URI [/s//api/saved_objects/_find...] and method [GET]"

I am experimenting in Python to retrieve the saved searches in my space in Kibana. I am trying to follow the example at https://www.elastic.co/guide/en/kibana/current/saved-objects-api-find.html Here is my code. r =…
Guy
  • 666
  • 1
  • 10
  • 34
0
votes
0 answers

elastic search upsert array element Nodejs

I want to add/update the new emp and empTrans in elastic serach but I am not sure what could be correct query to upsert(add and update) the record in NodeJs { id: '1', emp: [{ empId: 'uuid + phonennumebr1', empDetail: { name: '', …