Questions tagged [elasticsearch]

Elasticsearch is a free and open, distributed, RESTful search engine based on Lucene.

Elasticsearch is a free and open, distributed, RESTful search engine based on and developed in .

Together, , , and are commonly known as the . With the addition of Beats, a free and open platform for single-purpose data shippers, the ELK Stack is now known as the Elastic Stack.

Elasticsearch is a distributed, scalable, and multitenant-capable full-text search engine with a RESTful web interface and schema-free documents. It is also document-oriented and includes various APIs, such as native Java and HTTP RESTful. Elasticsearch supports both schema on read and schema on write on the same data, providing speed an

Elasticsearch allows you to choose to store data locally for fast search or store remotely on object-based storage such as for lower-cost options.

Elasticsearch comes with various text preprocessing algorithms, allowing users to set up custom or predefined multilingual analyzers to improve search relevance.

Official clients are available in , , , , , , , and many other languages.

Latest stable releases:

Elastic is the parent company of the Elasticsearch product.

58010 questions
55
votes
7 answers

ElasticSearch - Optimal number of Shards per node

I would appreciate if someone could suggest the optimal number of shards per ES node for optimal performance or provide any recommended way to arrive at the number of shards one should use, given the number of cores and memory foot print.
Rajan
  • 739
  • 1
  • 6
  • 8
54
votes
12 answers

Elasticsearch: Job for elasticsearch.service failed

I am currently trying to setup Elasticsearch for a project. I have installed Elasticsearch 7.4.1 and I have also installed Java, that is openjdk 11.0.4. But when I try to start Elasticsearch using the command sudo systemctl start elasticsearch I…
Promise Preston
  • 24,334
  • 12
  • 145
  • 143
54
votes
4 answers

Find distinct values, not distinct counts in elasticsearch

Elasticsearch documentation suggests* that their piece of code *documentation fixed GET /cars/transactions/_search?search_type=count { "aggs": { "distinct_colors": { "cardinality": { "field": "color" } } …
jasiustasiu
  • 1,468
  • 2
  • 20
  • 28
53
votes
4 answers

Limit the number of results returned by Elastic Search

I am having an issue where i want to reduce the number of results from Elastic search to 1,000 no matter how many matching results are there matching, but this should not affect the ranking and scoring. I was trying terminate_after, but that seems…
RohitWagh
  • 1,999
  • 3
  • 22
  • 43
53
votes
5 answers

How to access Kibana from Amazon elasticsearch service?

I created Amazon elasticsearch service and populated data into it using logstash, which has been installed on an EC2 instance. On the Amazon elasticservice console page, there will be a link to access…
53
votes
5 answers

Best way to check if a field exist in an Elasticsearch document

What is the best way to check if a field of a document in elasticsearch exists? I can't find anything in the documentation. For example if this document doesn't have the field/key "price" I don't want to return in the result. { "updated":…
Ekaitz Hernandez Troyas
  • 1,147
  • 2
  • 11
  • 18
53
votes
7 answers

elasticsearch - what to do with unassigned shards

my cluster is with yellow status because some shards are unassigned. what to do with this? I tried set cluster.routing.allocation.disable_allocation = false to all indexes, but I think this don't work because I'm using version 1.1.1. I also tried…
user3175226
  • 3,579
  • 7
  • 28
  • 47
52
votes
2 answers

Can I use Elasticsearch free of charge?

I just wanna know if Elasticsearch is free. I know it is open source but I checked the website and I didn't find anything about pricing, though I did found subscription with no pricing. So, is it free for long-term use? Just to let you know, I'm…
AbdallahRizk
  • 818
  • 1
  • 8
  • 18
51
votes
5 answers

AWS elastic-search. FORBIDDEN/8/index write (api). Unable to write to index

I am trying dump a list of docs to an AWS elastic-search instance. It was running fine. Then, all of sudden it started throwing this error: { _index: '', _type: 'type', _id: 'record id', status: 403, error: { type:…
paachi
  • 682
  • 1
  • 7
  • 15
51
votes
6 answers

High disk watermark exceeded even when there is not much data in my index

I'm using elasticsearch on my local machine. The data directory is only 37MB in size but when I check logs, I can see: [2015-05-17 21:31:12,905][WARN ][cluster.routing.allocation.decider] [Chrome] high disk watermark [10%] exceeded on…
Mandeep Singh
  • 7,674
  • 19
  • 62
  • 104
50
votes
1 answer

How to query elasticsearch for greater than and less than?

I want to get values between 1000 and 2000. I tried this query: { "query": { "bool": { "filter": [{ "range": { "price": { "gte": 1000 }, …
Rakmo
  • 1,926
  • 3
  • 19
  • 37
50
votes
4 answers

ElasticSearch, multi-match with filter?

I have a multi-match query in ES, and wish to add a filter. { "multi_match" : { "query" : "this is a test", "fields" : [ "subject^2", "message" ] } } What is the syntax for adding this filter? I tried: { "multi_match" => { "query"…
Henley
  • 21,258
  • 32
  • 119
  • 207
49
votes
2 answers

Elasticsearch Filtered query vs Filter

Is there any difference between "query and filter in filtered" and "query and filter on the root"? for example Case 1: { "query":{ "filtered":{ "query":{ "term":{"title":"kitchen3"} }, "filter":{ …
otiai10
  • 4,289
  • 5
  • 38
  • 50
49
votes
4 answers

How to not-analyze in ElasticSearch?

I've got a field in an ElasticSearch field which I do not want to have analyzed, i. e. it should be stored and compared verbatim. The values will contain letters, numbers, whitespace, dashes, slashes and maybe other characters. If I do not give an…
Alfe
  • 56,346
  • 20
  • 107
  • 159
48
votes
3 answers

How to test ElasticSearch in a Rails application (Rspec)

I was wondering how you were testing the search in your application when using ElasticSearch and Tire. How do you setup a new ElasticSearch test instance? Is there a way to mock it? Any gems you know of that might help with that? Some stuff I…
Robin
  • 21,667
  • 10
  • 62
  • 85