Open raff-s opened 1 year ago
We should be able to use the journal clean functionality even when there are many indices
It throws Yajl::EncodeError: Max nesting depth of 256 exceeded
Yajl::EncodeError: Max nesting depth of 256 exceeded
Run Chewy::RakeHelper.journal_clean(except:"some_index") You will see that you get a deeply nested ES query that looks like the following
Chewy::RakeHelper.journal_clean(except:"some_index")
:body=>{:query=>{:bool=>{:filter=>{:bool=>{:should=>[{:bool=>... {:term=>{:index_name=>...
Due to the logic here we'll add one level of nesting per index so when we have a large collection of indices it throws Yajl::EncodeError: Max nesting depth of 256 exceeded
Expected behavior
We should be able to use the journal clean functionality even when there are many indices
Actual behavior
It throws
Yajl::EncodeError: Max nesting depth of 256 exceeded
Steps to reproduce the problem
Run
Chewy::RakeHelper.journal_clean(except:"some_index")
You will see that you get a deeply nested ES query that looks like the followingDue to the logic here we'll add one level of nesting per index so when we have a large collection of indices it throws
Yajl::EncodeError: Max nesting depth of 256 exceeded
Version Information