Elastica icon indicating copy to clipboard operation
Elastica copied to clipboard

Get default values from index setting api

Open krasilnikovs opened this issue 3 years ago • 2 comments

Problem:

I need to retrieve index settings like 'max_result_window' but in the response body default value is not returned, in order to fetch the default value need to add the include_default query param to /_setting request.

Suggestion:

We can add the ability to set flag include_default(or by default set to true?) and change the behavior of \Elastica\Index\Settings::get method

  1. search setting value in the setting key as before
  2. if the value is not found on 1 step then search setting value in default key.

krasilnikovs avatar Aug 16 '22 08:08 krasilnikovs

What do think about this? is it will be useful for this lib?

krasilnikovs avatar Aug 16 '22 08:08 krasilnikovs

I have prepared PR: https://github.com/ruflin/Elastica/pull/2115

krasilnikovs avatar Aug 16 '22 09:08 krasilnikovs

Closing as this merged.

deguif avatar Oct 17 '22 18:10 deguif