unknown setting [index.similarity]
See original GitHub issueI recently upgraded to elasticsearch 5.0 and am trying to get things working on a code that worked fine with elasticsearch 2.x, I’m trying to track down the problem… The elasticsearch.js code where the error is thrown looks like this
client.indices.create({
index: indexName,
body: {
settings: {
number_of_shards: 1,
similarity : "norm_bm25"
}
},
... error stuff
Also, I’m trying to set the default index settings using
curl -XPUT 'http://localhost:9200/_template/template1' -d '{
"template" : "*",
"settings.number_of_replicas" : "1",
"settings.number_of_shards" : "1",
"settings.similarity.default.type" : "BM25",
"settings.similarity.default.b" : "0.0",
"settings.similarity.default.k1" : "1.2",
"settings.similarity.norm_bm25.type" : "BM25",
"settings.similarity.norm_bm25.b" : "0.75",
"settings.similarity.norm_bm25.k1" : "1.2"
}'
These values were set in the elasticsearch.yml in elasticsearch 2.x (but you can no longer do that in elasticsearch 5.0)
The error I receive is
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.similarity] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
}
],
"type": "illegal_argument_exception",
"reason": "unknown setting [index.similarity] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
"status": 400
}
Any ideas as to why this is happening? I don’t seem to be able to find the documentation about how to set similarity in an index template, or how to do it in indices.create…
Thanks for any help.
Issue Analytics
- State:
- Created 7 years ago
- Comments:13
Top Results From Across the Web
Similarity module | Elasticsearch Guide [8.5] | Elastic
A similarity (scoring / ranking model) defines how matching documents are scored. Similarity is per field, meaning that via the mapping one can...
Read more >Unknown Similarity type " + value + " for field " + name + "
This guide will help you check for common problems that cause the log ” Unknown Similarity type ” + value + ” for...
Read more >Elasticsearch changing similarity does not work - Stack Overflow
Changing the similarity algorithm of my index does not work. I wan't to compare BM25 vs. TF-IDF, but i always get the same...
Read more >API - Elastiknn
This document covers the Elastiknn API, including: indexing settings, REST API payloads, all aproximate similarity models, and some nice-to-know ...
Read more >org.elasticsearch.index.similarity.SimilarityProviders Maven / Gradle ...
org.elasticsearch.index.similarity. ... Set; import static java.util. ... isEmpty() == false) { DEPRECATION_LOGGER.deprecated("Unknown settings for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jloveric the similarity setting has been renamed to classic. [See here] (https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking_50_settings_changes.html#_similarity_settings
I am also faceing that issue,I paste [curl -X PUT “localhost:9200/customer?pretty”] in my terminal and is ok