Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from legacy client to opensearch client #2220

Open
zhongnansu opened this issue Aug 30, 2022 · 2 comments
Open

Migrate from legacy client to opensearch client #2220

zhongnansu opened this issue Aug 30, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request medium priority needs research technical debt If not paid, jeapardizes long-term success and maintainability of the repository.

Comments

@zhongnansu
Copy link
Member

Legacy ES client is still used in many places in OSD. E.g.

const result = await context.core.opensearch.legacy.client.callAsCurrentUser(
'transport.request',
{
method: 'GET',
path: `/_resolve/index/${encodeURIComponent(req.params.query)}${
queryString ? '?' + new URLSearchParams(queryString).toString() : ''

Since opensearch js client is available, do we have a plan for OSD core to migrate to use new client, and remove legacy client?
For example the above code in index_pattern_management can be migrated to something like below, that uses new client.

  const { body } = await context.core.elasticsearch.client.asCurrentUser.indices.resolveIndex({
        name: req.params.query,
        expand_wildcards: req.query.expand_wildcards || 'open',
      });
      return res.ok({ body });
@zhongnansu zhongnansu added enhancement New feature or request untriaged labels Aug 30, 2022
@kristenTian
Copy link
Contributor

[Triage]: No plan yet but we need one for migrating off the legacy one.
This will be with a scope of a project but not a quick task.

@seanneumann @ahopp

@zhongnansu
Copy link
Member Author

add @dagneyb

@zhongnansu zhongnansu changed the title Is there a plan to migrate from legacy client to opensearch client? Migrate from legacy client to opensearch client Apr 18, 2023
@zhongnansu zhongnansu added the technical debt If not paid, jeapardizes long-term success and maintainability of the repository. label Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium priority needs research technical debt If not paid, jeapardizes long-term success and maintainability of the repository.
Projects
None yet
Development

No branches or pull requests

3 participants