[x] Type _doc is used in the elasticsearch_plugin::get_account_history() function, which is used in an API and related unit tests. I think nobody is using it in production.
[x] Type _doc is used multiple times in es_test. Note that _doc is needed for the GET API, but should not be used with the SEARCH API or the COUNT API.
[x] Fix for ES 8 Wildcard expressions or all indices are not allowed when trying to delete all indices for cleanup in unit tests.
Cause: different default behavior between ES 7 and ES 8.
To delete all indices, use _all or * . To disallow the deletion of indices with _all or wildcard expressions, set the action.destructive_requires_name cluster setting to true.
By default, this parameter does not support wildcards (*) or _all. To use wildcards or _all, set the action.destructive_requires_name cluster setting to false.
For issues #2670 and #2706.
Note: BitShares Mekong 6.1 can work with ElasticSearch version 8 already, except that
xpack.security.http.ssl.enabled=false
, andhistory_api::get_account_history
API doesn't work, andes_test
unit tests will fail.This PR fixes the API and the test cases mentioned above.
key_not_found_exception: {"key":"count"}
https://github.com/bitshares/bitshares-core/blob/bd440cf0cdbda06fe7b0ca833b273fbf9b1fd985/tests/elasticsearch/main.cpp#L84 Cause: cannot specify types in ES 8 (see #1997)._doc
is used in theelasticsearch_plugin::get_account_history()
function, which is used in an API and related unit tests. I think nobody is using it in production._doc
is used in theelasticsearch_plugin::get_operation_by_id()
function, which is unused (added in https://github.com/bitshares/bitshares-core/pull/1725 with context)._doc
is used multiple times ines_test
. Note that_doc
is needed for theGET
API, but should not be used with theSEARCH
API or theCOUNT
API.Wildcard expressions or all indices are not allowed
when trying to delete all indices for cleanup in unit tests. Cause: different default behavior between ES 7 and ES 8.