Skip to content

Commit

Permalink
Tie into manually edited client
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
  • Loading branch information
Xtansia committed Aug 26, 2024
1 parent 0caa844 commit 612b52a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
12 changes: 12 additions & 0 deletions java-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ java {
}
}

sourceSets {
main {
java {
srcDir("src/generated/java")
}
}
}

tasks.withType<ProcessResources> {
expand(
"version" to version,
Expand Down Expand Up @@ -186,6 +194,10 @@ dependencies {
// http://json-b.net/
implementation("jakarta.json.bind", "jakarta.json.bind-api", "2.0.0")

// EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
// https://projects.eclipse.org/projects/ee4j.ca
implementation("jakarta.annotation", "jakarta.annotation-api", "1.3.5")

// Apache 2.0

implementation("com.fasterxml.jackson.core", "jackson-core", jacksonVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
import org.opensearch.client.opensearch.features.OpenSearchFeaturesAsyncClient;
import org.opensearch.client.opensearch.indices.OpenSearchIndicesAsyncClient;
import org.opensearch.client.opensearch.ingest.OpenSearchIngestAsyncClient;
import org.opensearch.client.opensearch.ml.OpenSearchMlAsyncClient;
import org.opensearch.client.opensearch.nodes.OpenSearchNodesAsyncClient;
import org.opensearch.client.opensearch.shutdown.OpenSearchShutdownAsyncClient;
import org.opensearch.client.opensearch.snapshot.OpenSearchSnapshotAsyncClient;
Expand Down Expand Up @@ -181,6 +182,10 @@ public OpenSearchIngestAsyncClient ingest() {
return new OpenSearchIngestAsyncClient(this.transport, this.transportOptions);
}

public OpenSearchMlAsyncClient ml() {
return new OpenSearchMlAsyncClient(this.transport, this.transportOptions);
}

public OpenSearchNodesAsyncClient nodes() {
return new OpenSearchNodesAsyncClient(this.transport, this.transportOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
import org.opensearch.client.opensearch.generic.OpenSearchGenericClient;
import org.opensearch.client.opensearch.indices.OpenSearchIndicesClient;
import org.opensearch.client.opensearch.ingest.OpenSearchIngestClient;
import org.opensearch.client.opensearch.ml.OpenSearchMlClient;
import org.opensearch.client.opensearch.nodes.OpenSearchNodesClient;
import org.opensearch.client.opensearch.shutdown.OpenSearchShutdownClient;
import org.opensearch.client.opensearch.snapshot.OpenSearchSnapshotClient;
Expand Down Expand Up @@ -184,6 +185,10 @@ public OpenSearchIngestClient ingest() {
return new OpenSearchIngestClient(this.transport, this.transportOptions);
}

public OpenSearchMlClient ml() {
return new OpenSearchMlClient(this.transport, this.transportOptions);
}

public OpenSearchNodesClient nodes() {
return new OpenSearchNodesClient(this.transport, this.transportOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*/
public class NeuralSearch {
private static final String SAMPLE_NAME = "neural-search";
private static final String RESOURCE_NAME_PREFIX = "csharp-" + SAMPLE_NAME;
private static final String RESOURCE_NAME_PREFIX = "java-" + SAMPLE_NAME;
private static final String ML_MODEL_GROUP_NAME = RESOURCE_NAME_PREFIX + "-model-group";
private static final String INGEST_PIPELINE_NAME = RESOURCE_NAME_PREFIX + "-ingest-pipeline";
private static final String INDEX_NAME = RESOURCE_NAME_PREFIX + "-index";
Expand Down

0 comments on commit 612b52a

Please sign in to comment.