diff --git a/CHANGELOG.md b/CHANGELOG.md index 913bfa0d9c..98b1ce4fbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ This section is for maintaining a changelog for all breaking changes for the cli ## [Unreleased 2.x] ### Added +- Adds `queryImage` (query_image) field to `NeuralQuery`, following definition in ([Neural Query](https://opensearch.org/docs/latest/query-dsl/specialized/neural/)) ([#1137](https://github.com/opensearch-project/opensearch-java/pull/1138)) ### Dependencies diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/NeuralQuery.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/NeuralQuery.java index e5b6ea3d27..baadf3e849 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/NeuralQuery.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/NeuralQuery.java @@ -70,7 +70,8 @@ public final String field() { } /** - * Required - Search query text. + * Required - The query_text if query_image is not set. + * Optional - The query_text if query_image is set. * * @return Search query text. */ @@ -79,7 +80,8 @@ public final String queryText() { } /** - * Required - Search query image. + * Required - The query_image if query_text is not set. + * Optional - The query_image if query_text is set. * * @return Search query image. */ @@ -178,7 +180,8 @@ public NeuralQuery.Builder field(@Nullable String field) { } /** - * Required - Search query text. + * Required - The query_text if query_image is not set. + * Optional - The query_text if query_image is set. * * @param queryText Search query text. * @return This builder. @@ -189,7 +192,8 @@ public NeuralQuery.Builder queryText(@Nullable String queryText) { } /** - * Required - Search query image. + * Required - The query_image if query_text is not set. + * Optional - The query_image if query_text is set. * * @param queryImage Search query image. * @return This builder. diff --git a/java-client/src/main/java/org/opensearch/client/util/MissingRequiredPropertiesException.java b/java-client/src/main/java/org/opensearch/client/util/MissingRequiredPropertiesException.java index d9a23b78d3..698374f123 100644 --- a/java-client/src/main/java/org/opensearch/client/util/MissingRequiredPropertiesException.java +++ b/java-client/src/main/java/org/opensearch/client/util/MissingRequiredPropertiesException.java @@ -6,30 +6,6 @@ * compatible open source license. */ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - package org.opensearch.client.util; import java.util.StringJoiner;