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

[BUG] Get an error in the PercolateQueryBuilder constructor after upgrading from version 2.9.0 to version 2.10.0 or higher #11857

Closed
NikSV01 opened this issue Jan 11, 2024 · 0 comments
Labels
bug Something isn't working Other untriaged

Comments

@NikSV01
Copy link

NikSV01 commented Jan 11, 2024

Describe the bug

I get an error in the PercolateQueryBuilder constructor after upgrading from version 2.9.0 to version 2.10.0 or higher. There is a code for creating a query:

new PercolateQueryBuilder("query", new BytesArray("""{"code": "%s"}""".formatted(value)), XContentType.JSON)

version 2.10.0 and above, I get an error that there is no constructor that allows to create such a query:

Cannot resolve constructor 'PercolateQueryBuilder(String, BytesArray, XContentType)'

Related component

Other

To Reproduce

  1. Update to version 2.10.0 or higher;
  2. Create instance of PercolateQueryBuilder with String field, BytesReference document, MediaType documentMediaType params;
  3. See error.

Expected behavior

There is an implementation of this constructor in the class:

public PercolateQueryBuilder(String field, BytesReference document, MediaType documentMediaType) {
    this(field, Collections.singletonList(document), documentMediaType);
}

I expect there is no error

Additional Details

This is most likely due to the fact that right now the PercolateQueryBuilder class uses the import dependency org.opensearch.core.common.bytes.bytes.BytesReference, and the implementation classes use org.opensearch.common.bytes.BytesReference

@NikSV01 NikSV01 added bug Something isn't working untriaged labels Jan 11, 2024
@github-actions github-actions bot added the Other label Jan 11, 2024
@NikSV01 NikSV01 changed the title [BUG] I get an error in the PercolateQueryBuilder constructor after upgrading from version 2.9.0 to version 2.10.0 or higher [BUG] Get an error in the PercolateQueryBuilder constructor after upgrading from version 2.9.0 to version 2.10.0 or higher Jan 11, 2024
@NikSV01 NikSV01 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Other untriaged
Projects
None yet
Development

No branches or pull requests

1 participant