Elasticsearch-net: Per field custom similarity in fluent PUT mapping

Created on 7 Jun 2016  路  2Comments  路  Source: elastic/elasticsearch-net

Nest version: 2.1.1

The current fluent syntax for creating a PUT mapping forces you to use a built in SimilarityOption (either Default or BM25) when specifying a per field similarity (https://github.com/elastic/elasticsearch-net/blob/master/src/Nest/Mapping/Types/CorePropertyDescriptorBase.cs), but I would like to use a custom similarity specified in the create index request instead. As far as I can tell this is currently only possible in Nest using AllFieldDescriptor.Similarity, but I don't want to apply the custom similarity to the _all field. According to the Elastic docs a per field custom similarity should be valid.

bug v2.4.6 v5.0.0-beta1

Most helpful comment

@lncramer I opened some PR's for this so provided @gmarz and/or @russcam agrees it will be fixed in the next 2.x release as well.

All 2 comments

Thanks for reporting @lncramer. Sadly, fixing this in our 2.x branch would be a breaking change. Targeting 5.x for now unless we can think of a clever work around.

@lncramer I opened some PR's for this so provided @gmarz and/or @russcam agrees it will be fixed in the next 2.x release as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mpdreamz picture Mpdreamz  路  21Comments

librecourage picture librecourage  路  13Comments

jptoto picture jptoto  路  13Comments

russcam picture russcam  路  16Comments

ffMathy picture ffMathy  路  16Comments