How to change similarity settings runtime?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to change similarity settings runtime?

spancer ray
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
Reply | Threaded
Open this post in threaded view
|

Re: How to change similarity settings runtime?

joergprante@gmail.com
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: <a href="http://elasticsearch-users.115913.n3.nabble.com/How-to-change-similarity-settings-runtime-tp4059810.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Felasticsearch-users.115913.n3.nabble.com%2FHow-to-change-similarity-settings-runtime-tp4059810.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFicrKwQdhAMs1E_yuM_zknJsEBPg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Felasticsearch-users.115913.n3.nabble.com%2FHow-to-change-similarity-settings-runtime-tp4059810.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFicrKwQdhAMs1E_yuM_zknJsEBPg';return true;">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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: How to change similarity settings runtime?

Ivan Brusic
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:

https://github.com/elasticsearch/elasticsearch/issues/4403

-- 
Ivan


On Mon, Jul 14, 2014 at 12:00 AM, Jörg Prante <[hidden email]> 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 [hidden email].
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.

--
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 [hidden email].
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.