I set my similarity type to 'BM25' in elasticsearch.yml , using index.similarity.default.type: BM25.
But in my search case(searching across some indices), I have to use the default similarity type.
Can I set the similarity type runtime without restarting the ES cluster? Or using java api to make
settings take effect for specific indices or ES TransportClient?
I tried put settings in my java code while construct a TransportClient, using code like below:
ImmutableSettings.settingsBuilder().put("index.similarity.custom.type", "default").build();
tried ‘index.similarity.default.type’, but it seems both 'index.similarity.default.type' and 'index.similarity.custom.type' didn't take effect while global settings in elasticsearch.yml is set.
You can not change the similarity module of an index during runtime.
Jörg
On Monday, July 14, 2014 6:11:44 AM UTC+2, spancer ray wrote:
Hi Guys,
I set my similarity type to 'BM25' in elasticsearch.yml , using
index.similarity.default.type: BM25.
But in my search case(searching across some indices), I have to use the
default similarity type.
Can I set the similarity type runtime without restarting the ES cluster?
Or
using java api to make
settings take effect for specific indices or ES TransportClient?
I tried put settings in my java code while construct a TransportClient,
using code like below:
ImmutableSettings.settingsBuilder().put("index.similarity.custom.type",
"default").build();
tried ‘index.similarity.default.type’, but it seems both
'index.similarity.default.type' and 'index.similarity.custom.type' didn't
take effect while global settings in elasticsearch.yml is set.
Jörg is correct. In general, it would be a bad idea to change the
similarity during runtime, but there are cases were it would be acceptable
and the system should allow for those cases:
You can not change the similarity module of an index during runtime.
Jörg
On Monday, July 14, 2014 6:11:44 AM UTC+2, spancer ray wrote:
Hi Guys,
I set my similarity type to 'BM25' in elasticsearch.yml , using
index.similarity.default.type: BM25.
But in my search case(searching across some indices), I have to use the
default similarity type.
Can I set the similarity type runtime without restarting the ES cluster?
Or
using java api to make
settings take effect for specific indices or ES TransportClient?
I tried put settings in my java code while construct a TransportClient,
using code like below:
ImmutableSettings.settingsBuilder().put("index.similarity.custom.type",
"default").build();
tried ‘index.similarity.default.type’, but it seems both
'index.similarity.default.type' and 'index.similarity.custom.type'
didn't
take effect while global settings in elasticsearch.yml is set.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.