How to change similarity settings runtime?

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.

Can anyone help?

Thanks a lot,
Spancer

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.

Can anyone help?

Thanks a lot,
Spancer

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/How-to-change-similarity-settings-runtime-tp4059810.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8cd6ee77-fc85-400f-a9b9-be551f02350b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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:

--
Ivan

On Mon, Jul 14, 2014 at 12:00 AM, Jörg Prante joergprante@gmail.com wrote:

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.

Can anyone help?

Thanks a lot,
Spancer

--
View this message in context: http://elasticsearch-users.
115913.n3.nabble.com/How-to-change-similarity-settings-
runtime-tp4059810.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/8cd6ee77-fc85-400f-a9b9-be551f02350b%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/8cd6ee77-fc85-400f-a9b9-be551f02350b%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBeRhe2wMCisnuuetYTATs7aBZhp%2BRxcnsR_GB5u5VaCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.