KnowledgeBaseRetrievalClient Class

  • java.lang.Object
    • com.azure.search.documents.knowledgebases.KnowledgeBaseRetrievalClient

public final class KnowledgeBaseRetrievalClient

Initializes a new instance of the synchronous KnowledgeBaseRetrievalClient type.

Method Summary

Modifier and Type Method and Description
String getEndpoint()

Gets the endpoint used to communicate with the Azure AI Search service.

SearchServiceVersion getServiceVersion()

Gets the SearchServiceVersion used to communicate with the Azure AI Search service.

KnowledgeBaseRetrievalResult retrieve(KnowledgeBaseRetrievalOptions retrievalRequest)

KnowledgeBase retrieves relevant data from backing stores.

KnowledgeBaseRetrievalResult retrieve(KnowledgeBaseRetrievalOptions retrievalRequest, String querySourceAuthorization)

KnowledgeBase retrieves relevant data from backing stores.

Response<KnowledgeBaseRetrievalResult> retrieveWithResponse(KnowledgeBaseRetrievalOptions retrievalRequest, RequestOptions requestOptions)

KnowledgeBase retrieves relevant data from backing stores.

Methods inherited from java.lang.Object

Method Details

getEndpoint

public String getEndpoint()

Gets the endpoint used to communicate with the Azure AI Search service.

Returns:

The endpoint.

getServiceVersion

public SearchServiceVersion getServiceVersion()

Gets the SearchServiceVersion used to communicate with the Azure AI Search service.

Returns:

The service version.

retrieve

public KnowledgeBaseRetrievalResult retrieve(KnowledgeBaseRetrievalOptions retrievalRequest)

KnowledgeBase retrieves relevant data from backing stores.

Parameters:

retrievalRequest - The retrieval request to process.

Returns:

the output contract for the retrieval response.

retrieve

public KnowledgeBaseRetrievalResult retrieve(KnowledgeBaseRetrievalOptions retrievalRequest, String querySourceAuthorization)

KnowledgeBase retrieves relevant data from backing stores.

Parameters:

retrievalRequest - The retrieval request to process.
querySourceAuthorization - Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents.

Returns:

the output contract for the retrieval response.

retrieveWithResponse

public Response<KnowledgeBaseRetrievalResult> retrieveWithResponse(KnowledgeBaseRetrievalOptions retrievalRequest, RequestOptions requestOptions)

KnowledgeBase retrieves relevant data from backing stores.

Header Parameters

| ------------------------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Name                            | Type   | Required | Description                                                                                                                         |
| x-ms-query-source-authorization | String | No       | Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. |

You can add these to a request with RequestOptions#addHeader

Parameters:

retrievalRequest - The retrieval request to process.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the output contract for the retrieval response along with Response<T>.

Applies to