We replace the "flush" and "delete" by "delete" and "deletedocuments"
logic. This makes it more obvious what will happen, without reading the
docs.
Also we kept the logic to always provide the index name, as
we will need them in the future. Due to elasticsearch v6 changes no
types are allowed in the same index in the future. Therefore we need to
make it possible to use different indexes in the future, leading to the
need to provide the document type all the time.
* Do not use variable, instead provide result to method call.
* Do not provide public method which is not part of API. Otherwise one
might use it in custom PHP code and switch connection later on. Then the
method call will no longer work.
With V6 of elasticsearch the meaning / handling of index and type has
changed, and it will change further in the future.
We therefore move code to own classes and adjust / refactor calling
code.
This way we need no external service.
Each developer can fully run all tests and cgl on local environment.
Also this integrated better into IDEs and editors.
* FEATURE: Added tests for hook and implemented logic
* To enable updating search index on modifications through TYPO3 API.
* BUGFIX: Fix path for unit test coverage report
* To fix failing delivery to scrutinizer.