You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MultiTermVectorsOperation class has all fields listed as required (see the constructor where each has ApiTypeHelper.requireNonNull or ApiTypeHelper.unmodifiableRequired) that according to the documentation should be optional. I used the documentation from ElasticSearch 7.10 as there is no documentation via OpenSearch that I could find.
Additionally, the version field is a boolean in the documentation but in the client API it is of type long.
Create a MtermvectorsRequest.Builder and add multiple MultiTermVectorsOperation objects to it. Either do not set an optional field like payloads or set both id and doc (as both are required) and the following errors are generated
When both id and doc are specified the following error occurs:
org.opensearch.client.opensearch._types.OpenSearchException: Request failed: [parse_exception] failed to parse term vectors request. either [id] or [doc] can be specified, but not both!
at org.opensearch.client.transport.httpclient5.ApacheHttpClient5Transport.prepareResponse(ApacheHttpClient5Transport.java:503) ~[opensearch-java-2.8.1.jar:?]
at org.opensearch.client.transport.httpclient5.ApacheHttpClient5Transport.lambda$performRequestAsync$0(ApacheHttpClient5Transport.java:178) ~[opensearch-java-2.8.1.jar:?]
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2179) ~[?:?]
at org.opensearch.client.transport.httpclient5.ApacheHttpClient5Transport$1.completed(ApacheHttpClient5Transport.java:223) ~[opensearch-java-2.8.1.jar:?]
at org.opensearch.client.transport.httpclient5.ApacheHttpClient5Transport$1.completed(ApacheHttpClient5Transport.java:212) ~[opensearch-java-2.8.1.jar:?]
If doc is removed, then the following error occurs:
org.opensearch.client.util.MissingRequiredPropertyException: Missing required property 'MultiTermVectorsOperation.doc'
at org.opensearch.client.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:89) ~[opensearch-java-2.8.1.jar:?]
at org.opensearch.client.opensearch.core.mtermvectors.MultiTermVectorsOperation.<init>(MultiTermVectorsOperation.java:85) ~[opensearch-java-2.8.1.jar:?]
at org.opensearch.client.opensearch.core.mtermvectors.MultiTermVectorsOperation$Builder.build(MultiTermVectorsOperation.java:420) ~[opensearch-java-2.8.1.jar:?]
if id is removed, then the following error occurs:
org.opensearch.client.util.MissingRequiredPropertyException: Missing required property 'MultiTermVectorsOperation.id'
at org.opensearch.client.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:89) ~[opensearch-java-2.8.1.jar:?]
at org.opensearch.client.opensearch.core.mtermvectors.MultiTermVectorsOperation.<init>(MultiTermVectorsOperation.java:89) ~[opensearch-java-2.8.1.jar:?]
at org.opensearch.client.opensearch.core.mtermvectors.MultiTermVectorsOperation$Builder.build(MultiTermVectorsOperation.java:420) ~[opensearch-java-2.8.1.jar:?]
What is the expected behavior?
I would expect to not be required to set optional fields or be able to specify either doc or id field and have the call succeed.
What is your host/environment?
Amazon OpenSearch Service version 2.11
Java client version 2.8.1
Do you have any screenshots?
I've included stack trace snippets above.
Do you have any additional context?
We are migrating from ElasticSearch 6.8 to OpenSearch 2.x and make use of the multiterm vector capability in our search application and this is a blocker.
The text was updated successfully, but these errors were encountered:
What is the bug?
The MultiTermVectorsOperation class has all fields listed as required (see the constructor where each has ApiTypeHelper.requireNonNull or ApiTypeHelper.unmodifiableRequired) that according to the documentation should be optional. I used the documentation from ElasticSearch 7.10 as there is no documentation via OpenSearch that I could find.
Additionally, the version field is a boolean in the documentation but in the client API it is of type long.
https://www.elastic.co/guide/en/elasticsearch/reference/7.10/docs-multi-termvectors.html
How can one reproduce the bug?
Create a MtermvectorsRequest.Builder and add multiple MultiTermVectorsOperation objects to it. Either do not set an optional field like payloads or set both id and doc (as both are required) and the following errors are generated
When both id and doc are specified the following error occurs:
If doc is removed, then the following error occurs:
if id is removed, then the following error occurs:
What is the expected behavior?
I would expect to not be required to set optional fields or be able to specify either doc or id field and have the call succeed.
What is your host/environment?
Amazon OpenSearch Service version 2.11
Java client version 2.8.1
Do you have any screenshots?
I've included stack trace snippets above.
Do you have any additional context?
We are migrating from ElasticSearch 6.8 to OpenSearch 2.x and make use of the multiterm vector capability in our search application and this is a blocker.
The text was updated successfully, but these errors were encountered: