Nope it's not there:
{
"topic-201607271639": {
"aliases": {
"topic-read": {},
"topic-write": {}
},
"mappings": { ... }
"settings": {
"index": {
"creation_date": "1469633972582",
"analysis": { ... }
"number_of_shards": "3",
"number_of_replicas": "0",
"uuid": "5hp7_rVdQeGZS_h3_mibKg",
"version": {
"created": "2030499"
}
}
},
"warmers": {}
}
}
Here's my create index call:
var createIndexRequest = new CreateIndexRequest(newIndexName)
{
Aliases = new Aliases(new Dictionary<IndexName, IAlias> {{GetWriteAlias(), new Alias()}}),
Similarity = new Similarities(new Dictionary<string, ISimilarity> {{"default", new CustomSimilarity()}}),
Mappings = new Mappings {...},
Settings = new IndexSettings
{
NumberOfReplicas = 0,
NumberOfShards = 3,
Analysis = new AnalysisDescriptor().Analyzers(...)
.TokenFilters(...)
}
};
var response = client.CreateIndex(createIndexRequest);
And here's my similarity:
public class CustomSimilarity : ISimilarity
{
public string Type
{
get { return "my.similarity.MySimilarity"; }
}
}
I wasn't sure whether that Type string should point to the similarity class or the plugin class but I have tried both and the result is the same.