Class Get
java.lang.Object
io.weaviate.client.base.AsyncBaseClient<T>
io.weaviate.client.base.AsyncBaseGraphQLClient<GraphQLResponse>
io.weaviate.client.v1.async.graphql.api.Get
- All Implemented Interfaces:
AsyncClientResult<GraphQLResponse>
public class Get
extends AsyncBaseGraphQLClient<GraphQLResponse>
implements AsyncClientResult<GraphQLResponse>
-
Field Summary
Fields inherited from class io.weaviate.client.base.AsyncBaseClient
client -
Constructor Summary
ConstructorsConstructorDescriptionGet(org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient client, Config config, AccessTokenProvider tokenProvider) -
Method Summary
Modifier and TypeMethodDescription<C> Future<Result<GraphQLTypedResponse<C>>>This method provides a better way of serializing a GraphQL response using one's defined classes.<C> Future<Result<GraphQLTypedResponse<C>>>run(Class<C> classOfC, org.apache.hc.core5.concurrent.FutureCallback<Result<GraphQLTypedResponse<C>>> callback) This method provides a better way of serializing a GraphQL response using one's defined classes.run(org.apache.hc.core5.concurrent.FutureCallback<Result<GraphQLResponse>> callback) withAsk(AskArgument ask) withAutocut(Integer autocut) withBm25(Bm25Argument bm25) withClassName(String className) withConsistencyLevel(String level) withFields(Field... fields) withGenerativeSearch(GenerativeSearchBuilder generativeSearch) withGroup(GroupArgument group) withGroupBy(GroupByArgument groupBy) withHybrid(HybridArgument hybrid) withNearAudio(NearAudioArgument nearAudio) withNearDepth(NearDepthArgument nearDepth) withNearImage(NearImageArgument nearImage) withNearImu(NearImuArgument nearImu) withNearObject(NearObjectArgument nearObject) withNearText(NearTextArgument nearText) withNearThermal(NearThermalArgument nearThermal) withNearVector(NearVectorArgument nearVector) withNearVideo(NearVideoArgument nearVideo) withOffset(Integer offset) withSort(SortArgument... sort) withTenant(String tenant) withWhere(WhereFilter where) Deprecated.withWhere(WhereArgument where) Methods inherited from class io.weaviate.client.base.AsyncBaseGraphQLClient
sendGraphQLTypedRequestMethods inherited from class io.weaviate.client.base.AsyncBaseClient
getRequest, sendDeleteRequest, sendDeleteRequest, sendGetRequest, sendGetRequest, sendHeadRequest, sendHeadRequest, sendPatchRequest, sendPatchRequest, sendPostRequest, sendPostRequest, sendPutRequest, sendPutRequestMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.weaviate.client.base.AsyncClientResult
run
-
Constructor Details
-
Get
public Get(org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient client, Config config, AccessTokenProvider tokenProvider)
-
-
Method Details
-
withClassName
-
withFields
-
withWhere
Deprecated. -
withWhere
-
withLimit
-
withOffset
-
withAfter
-
withBm25
-
withHybrid
-
withAsk
-
withNearText
-
withNearObject
-
withNearVector
-
withNearImage
-
withNearAudio
-
withNearVideo
-
withNearDepth
-
withNearThermal
-
withNearImu
-
withGroup
-
withSort
-
withGenerativeSearch
-
withConsistencyLevel
-
withGroupBy
-
withTenant
-
withAutocut
-
run
public Future<Result<GraphQLResponse>> run(org.apache.hc.core5.concurrent.FutureCallback<Result<GraphQLResponse>> callback) - Specified by:
runin interfaceAsyncClientResult<GraphQLResponse>
-
run
This method provides a better way of serializing a GraphQL response using one's defined classes. Example: In Weaviate we have defined collection named Soup with name and price properties. For client to be able to properly serialize GraphQL response to an Object with convenient methods accessing GraphQL settings one can create a class, example:import com.google.gson.annotations.SerializedName; public class Soups { {@literal @}SerializedName(value = "Soup") List<Soup> soups; public List<Soup> getSoups() { return soups; } public static class Soup extends GraphQLGetBaseObject { String name; Float price; public String getName() { return name; } public Float getPrice() { return price; } } }- Type Parameters:
C- - Class of C- Parameters:
classOfC- - class describing Weaviate object, example: Soups class- Returns:
- Result of GraphQLTypedResponse of a given class
- See Also:
-
run
public <C> Future<Result<GraphQLTypedResponse<C>>> run(Class<C> classOfC, org.apache.hc.core5.concurrent.FutureCallback<Result<GraphQLTypedResponse<C>>> callback) This method provides a better way of serializing a GraphQL response using one's defined classes. Example: In Weaviate we have defined collection named Soup with name and price properties. For client to be able to properly serialize GraphQL response to an Object with convenient methods accessing GraphQL settings one can create a class, example:import com.google.gson.annotations.SerializedName; public class Soups { {@literal @}SerializedName(value = "Soup") List<Soup> soups; public List<Soup> getSoups() { return soups; } public static class Soup extends GraphQLGetBaseObject { String name; Float price; public String getName() { return name; } public Float getPrice() { return price; } } }- Type Parameters:
C- - Class of C- Parameters:
classOfC- - class describing Weaviate object, example: Soups classcallback- - Result of GraphQLTypedResponse of a given class callback- Returns:
- Result of GraphQLTypedResponse of a given class
- See Also:
-