Replace calling ::Gitlab::Elastic::Helper.default.client with calling Gitlab::Search::Client

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Instead of calling Gitlab::Elastic::Helper.default.client, call Gitlab::Search::Client which has an adapter for Gitlab::Elastic::Helper.default.client. This sets us up to add a new adapter which eventually will remove reliance on the gem.

There are some places where Gitlab::Elastic::Helper.default.client is called directly and others where Gitlab::Elastic::Helper.default is stored into a variable (example helper) and helper.client is called.

Implementation plan

The fix depends on the use of the .client call in the code. It could include:

  • replace existing code in client method with Gitlab::Search::Client.new
  • create a new client method which uses Gitlab::Search::Client.new. replace all calls to helper.client with the new method

Files which need to be changed:

Edited by 🤖 GitLab Bot 🤖