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
204
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
  • 15,072
  • 19
  • 88
  • 167
203
votes
17 answers

Delete all documents from index/type without deleting type

I know one can delete all documents from a certain type via deleteByQuery. Example: curl -XDELETE 'http://localhost:9200/twitter/tweet/_query' -d '{ "query" : { "term" : { "user" : "kimchy" } } }' But i have NO term and simply want…
Michael Leiss
  • 5,395
  • 3
  • 21
  • 27
199
votes
28 answers

ElasticSearch: Unassigned Shards, how to fix?

I have an ES cluster with 4 nodes: number_of_replicas: 1 search01 - master: false, data: false search02 - master: true, data: true search03 - master: false, data: true search04 - master: false, data: true I had to restart search03, and when it came…
Spanky
  • 5,608
  • 10
  • 39
  • 45
187
votes
7 answers

How to use Elasticsearch with MongoDB?

I have gone through many blogs and sites about configuring Elasticsearch for MongoDB to index Collections in MongoDB but none of them were straightforward. Please explain to me a step by step process for installing elasticsearch, which should…
bibin david
  • 1,905
  • 3
  • 12
  • 8
182
votes
3 answers

Content-Type header [application/x-www-form-urlencoded] is not supported on Elasticsearch

I used to have ElasticSearch 5.2, and just upgraded to 6.0. I am trying to create an index template following guide here, but got error Content-Type header [application/x-www-form-urlencoded] is not supported My query is curl -X PUT…
Barry Leishman
  • 1,823
  • 2
  • 7
  • 7
179
votes
4 answers

Elastic search, multiple indexes vs one index and types for different data sets?

I have an application developed using the MVC pattern and I would like to index now multiple models of it, this means each model has a different data structure. Is it better to use mutliple indexes, one for each model or have a type within the same…
floriank
  • 25,546
  • 9
  • 42
  • 66
174
votes
7 answers

ElasticSearch - Return Unique Values

How would I get the values of all the languages from the records and make them unique. Records PUT items/1 { "language" : 10 } PUT items/2 { "language" : 11 } PUT items/3 { "language" : 10 } Query GET items/_search { ... } # => Expected…
ChuckJHardy
  • 6,956
  • 6
  • 35
  • 39
167
votes
2 answers

Elasticsearch: Difference between "Term", "Match Phrase", and "Query String"

New here to Elasticsearch and trying to get a better understanding on the difference between these queries. As far as I can tell, term matches a single term (needs to be lowercase for the match to work?), and both match phrase and query string…
blee908
  • 12,165
  • 10
  • 34
  • 41
166
votes
4 answers

How do I escape characters in GitHub code search?

I'm trying to use GitHub's code search to search for some lines of code containing characters like =, +, etc. I understand from https://help.github.com/articles/searching-code/#considerations-for-code-search that these characters are wildcards and…
Eli Rose
  • 6,788
  • 8
  • 35
  • 55
165
votes
9 answers

how to rename an index in a cluster?

I need to rename several indexes in a cluster (their name must be changed, I cannot use aliases). I saw that there are no supported ways to do that, the closest I found is to rename the directory of the index, I tried this in a cluster. The cluster…
WoJ
  • 27,165
  • 48
  • 180
  • 345
161
votes
11 answers

How to search for a part of a word with ElasticSearch

I've recently started using ElasticSearch and I can't seem to make it search for a part of a word. Example: I have three documents from my couchdb indexed in ElasticSearch: { "_id" : "1", "name" : "John Doeman", "function" : "Janitor" } { …
ldx
  • 2,536
  • 2
  • 18
  • 27
152
votes
31 answers

Elasticsearch: Failed to connect to localhost port 9200 - Connection refused

When I tried connecting to Elasticsearch using the curl http://localhost:9200 it is working fine. But when I run the curl http://IpAddress:9200 it is throwing an error saying Failed to connect to localhost port 9200: Connection refused How to…
chinna2580
  • 2,065
  • 2
  • 16
  • 30
150
votes
2 answers

What are some use cases for using Elasticsearch versus standard sql queries?

I'm just getting started with Elasticsearch and one of the main use cases I've seen is its scalability with searches on large data sets, but besides this when would you want to use it over just creating sql queries with a traditional RDBMS?
James Drinkard
  • 15,342
  • 16
  • 114
  • 137
145
votes
9 answers

No mapping found for field in order to sort on in ElasticSearch

Elasticsearch throws a SearchParseException while parsing query if there are some documents found not containing field used in sort criteria. SearchParseException: Parse Failure [No mapping found for [price] in order to sort on] How can I…
Yadu
  • 4,891
  • 5
  • 19
  • 12
137
votes
8 answers

Elasticsearch vs Cassandra vs Elasticsearch with Cassandra

I am learning NoSQL and looking at different options for one of my client's requirements. I have gone through various resources before putting up this question (a person with little knowledge in NoSQL) I need to store data at faster rate and read…
RaceBase
  • 18,428
  • 47
  • 141
  • 202