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 release: Elasticsearch 7.13.0 - May 25, 2021

Elastic is the parent company of the Elasticsearch product.

50429 questions
745
votes
12 answers

Solr vs. ElasticSearch

What are the core architectural differences between these technologies? Also, what use cases are generally more appropriate for each?
Ben ODay
  • 19,926
  • 7
  • 41
  • 67
530
votes
30 answers

Elasticsearch query to return all records

I have a small database in Elasticsearch and for testing purposes would like to pull all records back. I am attempting to use a URL of the form... http://localhost:9200/foo/_search?pretty=true&q={'matchAll':{''}} Can someone give me the URL you…
John Livermore
  • 26,237
  • 38
  • 112
  • 191
494
votes
13 answers

Make elasticsearch only return certain fields?

I'm using elasticsearch to index my documents. Is it possible to instruct it to only return particular fields instead of the entire json document it has stored?
user1199438
  • 5,077
  • 2
  • 13
  • 7
440
votes
9 answers

ElasticSearch, Sphinx, Lucene, Solr, Xapian. Which fits for which usage?

I'm currently looking at other search methods rather than having a huge SQL query. I saw elasticsearch recently and played with whoosh (a Python implementation of a search engine). Can you give reasons for your choice(s)?
dzen
  • 6,771
  • 5
  • 24
  • 31
419
votes
20 answers

Removing Data From ElasticSearch

I'm new to ElasticSearch. I'm trying to figure out how to remove data from ElasticSearch. I have deleted my indexes. However, that doesn't seem to actually remove the data itself. The other stuff I've seen points to the Delete by Query feature.…
user687554
  • 8,165
  • 22
  • 64
  • 119
358
votes
10 answers

Shards and replicas in Elasticsearch

I am trying to understand what shard and replica is in Elasticsearch, but I didn't manage to understand it. If I download Elasticsearch and run the script, then from what I know I have started a cluster with a single node. Now this node (my PC) have…
LuckyLuke
  • 42,935
  • 77
  • 254
  • 416
303
votes
23 answers

List all indexes on ElasticSearch server?

I would like to list all indexes present on an ElasticSearch server. I tried this: curl -XGET localhost:9200/ but it just gives me this: { "ok" : true, "status" : 200, "name" : "El Aguila", "version" : { "number" : "0.19.3", …
Eva
  • 3,931
  • 2
  • 18
  • 26
249
votes
4 answers

Making a request to a RESTful API using python

I have a RESTful API that I have exposed using an implementation of Elasticsearch on an EC2 instance to index a corpus of content. I can query the search by running the following from my terminal (MacOSX): curl -XGET…
user7289
  • 25,989
  • 27
  • 64
  • 86
215
votes
6 answers

elasticsearch bool query combine must with OR

I am currently trying to migrate a solr-based application to elasticsearch. I have this lucene query (( name:(+foo +bar) OR info:(+foo +bar) )) AND state:(1) AND (has_image:(0) OR has_image:(1)^100) As far as I understand this is a…
Jesse
  • 3,163
  • 2
  • 14
  • 16
214
votes
4 answers

Beginner's guide to ElasticSearch

There hasn't been any books about ElasticSearch (that I know of), and http://www.elasticsearch.org/guide/ seems to contain only references. Any good beginner's guide or tutorials, perhaps by examples, to recommend, especially in terms of the…
uzyn
  • 6,235
  • 4
  • 20
  • 41
212
votes
8 answers

Queries vs. Filters

I can't see any description of when I should use a query or a filter or some combination of the two. What is the difference between them? Can anyone please explain?
Jonesie
  • 6,101
  • 8
  • 43
  • 59
195
votes
5 answers

Elasticsearch error: cluster_block_exception [FORBIDDEN/12/index read-only / allow delete (api)], flood stage disk watermark exceeded

When trying to post documents to Elasticsearch as normal I'm getting this error: cluster_block_exception [FORBIDDEN/12/index read-only / allow delete (api)]; I also see this message on the Elasticsearch logs: flood stage disk watermark [95%]…
Sean Hammond
  • 8,504
  • 5
  • 23
  • 29
194
votes
1 answer

elasticsearch v.s. MongoDB for filtering application

This question is about making an architectural choice prior to delving into the details of experimentation and implementation. It's about the suitability, in scalability and performance terms, of elasticsearch v.s. MongoDB, for a somewhat specific…
matanster
  • 13,785
  • 14
  • 75
  • 135
193
votes
4 answers

Show all Elasticsearch aggregation results/buckets and not just 10

I'm trying to list all buckets on an aggregation, but it seems to be showing only the first 10. My search: curl -XPOST "http://localhost:9200/imoveis/_search?pretty=1" -d' { "size": 0, "aggregations": { "bairro_count": { …
Samuel Rizzo
  • 2,061
  • 2
  • 14
  • 18
189
votes
3 answers

Elasticsearch difference between MUST and SHOULD bool query

What is the difference between MUST and SHOULD bool query in ES? If I ONLY want results that contain my terms should I then use must ? I have a query that should only contain certain values, and also no results that has a lower date/timestamp than…
user2722667
  • 6,435
  • 14
  • 41
  • 85
1
2 3
99 100