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
0
votes
1 answer

DeleteByQueryRequest socket timeout exception - java high level rest client api

I'm a beginner to elasticsearch and I want to delete a huge amount of document which matches to the particular query. I'm using DeleteByQueryRequest for this purpose. I tried the code below. String fileName="output2.log"; RestHighLevelClient client…
0
votes
1 answer

Elasticsearch - creating index failure when doing it through java API but not manually

I have a complex index with a ngram analyzer. I want to be able to create a new index through the Java API. I am currently using Kotlin for this but using the same framework. I have created the schema for this index as so: { "settings": { …
Grbe1l
  • 489
  • 4
  • 16
0
votes
1 answer

Filter the Elasticsearch cat API

I am using the _cat API of elasticsearch to get the various details of my elasticsearch cluster. https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html What I want is the ability to filter the response which I can't see in the…
user12056260
0
votes
1 answer

Elasticsearch count api does not return correct value of count

I am trying get the count of the log messages from elasticsearch which were logged by a pod, in a particular time-frame, using the count API. The below request does not return correct count. The count returned by this API, does not match with 'hits'…
nilse
  • 143
  • 1
  • 1
  • 6
0
votes
2 answers

Trouble making a query with Elasticsearch

Well guys I hope you're doing fine in this epidemic times, I'm having trouble in neglecting special characters in a query at elasticsearch : Here is what I want to do : Select * from table where ext like %6500% and start_time like %-01-% Here is…
0
votes
1 answer

Elasticsearch collapse and sort using java API

I am new to EL. My req would be I need fetch the data from ELS through Java API using spring boot. I have written search query along with collapse and sort. Its working perfectly fine. But I am getting how to re-write this code in java spring boot.…
HShetty
  • 21
  • 2
  • 7
0
votes
2 answers

How to update hashmap data in ElasticSearch using API Update (version 5) in Java?

I am trying to update data in Elastic Search Server using the following Code. 1) I have used the following to insert the data in elastic search. HashMap hmExtra = new HashMap(); hmExtra.put("One", "1"); …
0
votes
1 answer

Elasticsearch - illegal_argument_exception when creating index with analyzers

I am using the Elasticsearch's PHP API and Advanced REST Client (ARC), both to test the ES API. When i try to create a new index with a custom analyzer, i get this error: "error": { "root_cause": [ { "type": "illegal_argument_exception", "reason":…
0
votes
1 answer

Elasticsearch: IndicesQuery in new Java API versions

I have two indices. One contains a nested object and the other one doesn't. When I try to execute a query on both of these indices, I get the following error: IllegalStateException[[nested] failed to find nested object under path [nestedItems]];…
Jardo
  • 1,939
  • 2
  • 25
  • 45
0
votes
1 answer

Elasticsearch PHP: Unknown key for a VALUE_STRING in [text]

I am using Elasticsearch-PHP [6.0] I have an index products where i have a name of products implement phrase suggester. Index Setting { "products": { "aliases": {}, "mappings": { "surat": { "properties": { …
user6051114
0
votes
1 answer

Why elastic search bulk insert uses \n delimiter, instead of using an array of json objects?

Here is a sample of bulk insertion provided by elastic search docs at: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html POST _bulk { "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } } { "field1" :…
TGW
  • 805
  • 10
  • 27
0
votes
0 answers

Using Delete By Query API and Bulk API together in Elastic

I couldn't see any documentation/example about using delete by query api with bulk api in elastic search. Simply, I want to delete all the documents having same A field and insert many documents just after that. If delete process fails, it shouldn't…
0
votes
0 answers

Retrieve total term frequency from Elasticsearch Java API

I am writing an Elasticsearch plugin, and in this plugin I need to retrieve the term frequency count from a specified in a certain field. At the moment I am using the query below, and reading the number of hits from the result: SearchResponse…
0
votes
1 answer

Custom query parser in search Api

I have a custom query parser and I can query my Index using Sense as follows: GET myIndex/_search { "query": { "myParser":{ "query" : "blabla" } } } My question is, how can I parse the query with myParser in Search Api? How do I…
javid
  • 23
  • 3
0
votes
0 answers

How can I set default field value when updating ES mapping

I have "stores" index in elasticsearch and want to add "chain" field with following json: { "properties": { "chain": { "type": "string", "store": true } } How can I set default value for all existiong documents in the index?
drew
  • 1
  • 1
  • 4