public class Discovery
extends com.ibm.cloud.sdk.core.service.BaseService
API Version: 1.0 See: https://cloud.ibm.com/docs/discovery
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SERVICE_NAME
Default service name used when configuring the `Discovery` client.
|
static String |
DEFAULT_SERVICE_URL
Default service endpoint URL.
|
Constructor and Description |
---|
Discovery(String version)
Constructs an instance of the `Discovery` client.
|
Discovery(String version,
com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Constructs an instance of the `Discovery` client.
|
Discovery(String version,
String serviceName)
Constructs an instance of the `Discovery` client.
|
Discovery(String version,
String serviceName,
com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Constructs an instance of the `Discovery` client.
|
Modifier and Type | Method and Description |
---|---|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentAccepted> |
addDocument(AddDocumentOptions addDocumentOptions)
Add a document.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> |
addTrainingData(AddTrainingDataOptions addTrainingDataOptions)
Add query to training data.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Collection> |
createCollection(CreateCollectionOptions createCollectionOptions)
Create a collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Configuration> |
createConfiguration(CreateConfigurationOptions createConfigurationOptions)
Add configuration.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Credentials> |
createCredentials(CreateCredentialsOptions createCredentialsOptions)
Create credentials.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Environment> |
createEnvironment(CreateEnvironmentOptions createEnvironmentOptions)
Create an environment.
|
com.ibm.cloud.sdk.core.http.ServiceCall<CreateEventResponse> |
createEvent(CreateEventOptions createEventOptions)
Create event.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Expansions> |
createExpansions(CreateExpansionsOptions createExpansionsOptions)
Create or update expansion list.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Gateway> |
createGateway(CreateGatewayOptions createGatewayOptions)
Create Gateway.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> |
createStopwordList(CreateStopwordListOptions createStopwordListOptions)
Create stopword list.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> |
createTokenizationDictionary(CreateTokenizationDictionaryOptions createTokenizationDictionaryOptions)
Create tokenization dictionary.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExample> |
createTrainingExample(CreateTrainingExampleOptions createTrainingExampleOptions)
Add example to training data query.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteAllTrainingData(DeleteAllTrainingDataOptions deleteAllTrainingDataOptions)
Delete all training data.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DeleteCollectionResponse> |
deleteCollection(DeleteCollectionOptions deleteCollectionOptions)
Delete a collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DeleteConfigurationResponse> |
deleteConfiguration(DeleteConfigurationOptions deleteConfigurationOptions)
Delete a configuration.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DeleteCredentials> |
deleteCredentials(DeleteCredentialsOptions deleteCredentialsOptions)
Delete credentials.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DeleteDocumentResponse> |
deleteDocument(DeleteDocumentOptions deleteDocumentOptions)
Delete a document.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DeleteEnvironmentResponse> |
deleteEnvironment(DeleteEnvironmentOptions deleteEnvironmentOptions)
Delete environment.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteExpansions(DeleteExpansionsOptions deleteExpansionsOptions)
Delete the expansion list.
|
com.ibm.cloud.sdk.core.http.ServiceCall<GatewayDelete> |
deleteGateway(DeleteGatewayOptions deleteGatewayOptions)
Delete Gateway.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteStopwordList(DeleteStopwordListOptions deleteStopwordListOptions)
Delete a custom stopword list.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteTokenizationDictionary(DeleteTokenizationDictionaryOptions deleteTokenizationDictionaryOptions)
Delete tokenization dictionary.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteTrainingData(DeleteTrainingDataOptions deleteTrainingDataOptions)
Delete a training data query.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteTrainingExample(DeleteTrainingExampleOptions deleteTrainingExampleOptions)
Delete example for training data query.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteUserData(DeleteUserDataOptions deleteUserDataOptions)
Delete labeled data.
|
com.ibm.cloud.sdk.core.http.ServiceCall<QueryResponse> |
federatedQuery(FederatedQueryOptions federatedQueryOptions)
Query multiple collections.
|
com.ibm.cloud.sdk.core.http.ServiceCall<QueryNoticesResponse> |
federatedQueryNotices(FederatedQueryNoticesOptions federatedQueryNoticesOptions)
Query multiple collection system notices.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Completions> |
getAutocompletion(GetAutocompletionOptions getAutocompletionOptions)
Get Autocomplete Suggestions.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Collection> |
getCollection(GetCollectionOptions getCollectionOptions)
Get collection details.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Configuration> |
getConfiguration(GetConfigurationOptions getConfigurationOptions)
Get configuration details.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Credentials> |
getCredentials(GetCredentialsOptions getCredentialsOptions)
View Credentials.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentStatus> |
getDocumentStatus(GetDocumentStatusOptions getDocumentStatusOptions)
Get document details.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Environment> |
getEnvironment(GetEnvironmentOptions getEnvironmentOptions)
Get environment info.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Gateway> |
getGateway(GetGatewayOptions getGatewayOptions)
List Gateway Details.
|
com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> |
getMetricsEventRate()
Percentage of queries with an associated event.
|
com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> |
getMetricsEventRate(GetMetricsEventRateOptions getMetricsEventRateOptions)
Percentage of queries with an associated event.
|
com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> |
getMetricsQuery()
Number of queries over time.
|
com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> |
getMetricsQuery(GetMetricsQueryOptions getMetricsQueryOptions)
Number of queries over time.
|
com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> |
getMetricsQueryEvent()
Number of queries with an event over time.
|
com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> |
getMetricsQueryEvent(GetMetricsQueryEventOptions getMetricsQueryEventOptions)
Number of queries with an event over time.
|
com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> |
getMetricsQueryNoResults()
Number of queries with no search results over time.
|
com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> |
getMetricsQueryNoResults(GetMetricsQueryNoResultsOptions getMetricsQueryNoResultsOptions)
Number of queries with no search results over time.
|
com.ibm.cloud.sdk.core.http.ServiceCall<MetricTokenResponse> |
getMetricsQueryTokenEvent()
Most frequent query tokens with an event.
|
com.ibm.cloud.sdk.core.http.ServiceCall<MetricTokenResponse> |
getMetricsQueryTokenEvent(GetMetricsQueryTokenEventOptions getMetricsQueryTokenEventOptions)
Most frequent query tokens with an event.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> |
getStopwordListStatus(GetStopwordListStatusOptions getStopwordListStatusOptions)
Get stopword list status.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> |
getTokenizationDictionaryStatus(GetTokenizationDictionaryStatusOptions getTokenizationDictionaryStatusOptions)
Get tokenization dictionary status.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> |
getTrainingData(GetTrainingDataOptions getTrainingDataOptions)
Get details about a query.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExample> |
getTrainingExample(GetTrainingExampleOptions getTrainingExampleOptions)
Get details for training data example.
|
String |
getVersion()
Gets the version.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionFieldsResponse> |
listCollectionFields(ListCollectionFieldsOptions listCollectionFieldsOptions)
List collection fields.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionsResponse> |
listCollections(ListCollectionsOptions listCollectionsOptions)
List collections.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListConfigurationsResponse> |
listConfigurations(ListConfigurationsOptions listConfigurationsOptions)
List configurations.
|
com.ibm.cloud.sdk.core.http.ServiceCall<CredentialsList> |
listCredentials(ListCredentialsOptions listCredentialsOptions)
List credentials.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListEnvironmentsResponse> |
listEnvironments()
List environments.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListEnvironmentsResponse> |
listEnvironments(ListEnvironmentsOptions listEnvironmentsOptions)
List environments.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Expansions> |
listExpansions(ListExpansionsOptions listExpansionsOptions)
Get the expansion list.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionFieldsResponse> |
listFields(ListFieldsOptions listFieldsOptions)
List fields across collections.
|
com.ibm.cloud.sdk.core.http.ServiceCall<GatewayList> |
listGateways(ListGatewaysOptions listGatewaysOptions)
List Gateways.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingDataSet> |
listTrainingData(ListTrainingDataOptions listTrainingDataOptions)
List training data.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExampleList> |
listTrainingExamples(ListTrainingExamplesOptions listTrainingExamplesOptions)
List examples for a training data query.
|
com.ibm.cloud.sdk.core.http.ServiceCall<QueryResponse> |
query(QueryOptions queryOptions)
Query a collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<LogQueryResponse> |
queryLog()
Search the query and event log.
|
com.ibm.cloud.sdk.core.http.ServiceCall<LogQueryResponse> |
queryLog(QueryLogOptions queryLogOptions)
Search the query and event log.
|
com.ibm.cloud.sdk.core.http.ServiceCall<QueryNoticesResponse> |
queryNotices(QueryNoticesOptions queryNoticesOptions)
Query system notices.
|
void |
setVersion(String version)
Sets the version.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Collection> |
updateCollection(UpdateCollectionOptions updateCollectionOptions)
Update a collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Configuration> |
updateConfiguration(UpdateConfigurationOptions updateConfigurationOptions)
Update a configuration.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Credentials> |
updateCredentials(UpdateCredentialsOptions updateCredentialsOptions)
Update credentials.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentAccepted> |
updateDocument(UpdateDocumentOptions updateDocumentOptions)
Update a document.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Environment> |
updateEnvironment(UpdateEnvironmentOptions updateEnvironmentOptions)
Update an environment.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExample> |
updateTrainingExample(UpdateTrainingExampleOptions updateTrainingExampleOptions)
Change label or cross reference for example.
|
configureClient, configureService, constructServiceUrl, constructServiceURL, disableRetries, enableGzipCompression, enableRetries, getAuthenticator, getClient, getDefaultHeaders, getEndPoint, getName, getServiceUrl, isJsonMimeType, isJsonPatchMimeType, setClient, setDefaultHeaders, setEndPoint, setServiceUrl, toString
public static final String DEFAULT_SERVICE_NAME
public static final String DEFAULT_SERVICE_URL
public Discovery(String version)
version
- Release date of the version of the API you want to use. Specify dates in
YYYY-MM-DD format. The current version is `2019-04-30`.public Discovery(String version, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
version
- Release date of the version of the API you want to use. Specify dates in
YYYY-MM-DD format. The current version is `2019-04-30`.authenticator
- the Authenticator
instance to be configured for this clientpublic Discovery(String version, String serviceName)
version
- Release date of the version of the API you want to use. Specify dates in
YYYY-MM-DD format. The current version is `2019-04-30`.serviceName
- the service name to be used when configuring the client instancepublic Discovery(String version, String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
version
- Release date of the version of the API you want to use. Specify dates in
YYYY-MM-DD format. The current version is `2019-04-30`.serviceName
- the service name to be used when configuring the client instanceauthenticator
- the Authenticator
instance to be configured for this clientpublic String getVersion()
Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current version is `2019-04-30`.
public void setVersion(String version)
version
- the new versionpublic com.ibm.cloud.sdk.core.http.ServiceCall<Environment> createEnvironment(CreateEnvironmentOptions createEnvironmentOptions)
Creates a new environment for private data. An environment must be created before collections can be created.
**Note**: You can create only one environment for private data per service instance. An attempt to create another environment results in an error.
createEnvironmentOptions
- the CreateEnvironmentOptions
containing the options for
the callServiceCall
with a result of type Environment
public com.ibm.cloud.sdk.core.http.ServiceCall<ListEnvironmentsResponse> listEnvironments(ListEnvironmentsOptions listEnvironmentsOptions)
List existing environments for the service instance.
listEnvironmentsOptions
- the ListEnvironmentsOptions
containing the options for
the callServiceCall
with a result of type ListEnvironmentsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<ListEnvironmentsResponse> listEnvironments()
List existing environments for the service instance.
ServiceCall
with a result of type ListEnvironmentsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<Environment> getEnvironment(GetEnvironmentOptions getEnvironmentOptions)
getEnvironmentOptions
- the GetEnvironmentOptions
containing the options for the
callServiceCall
with a result of type Environment
public com.ibm.cloud.sdk.core.http.ServiceCall<Environment> updateEnvironment(UpdateEnvironmentOptions updateEnvironmentOptions)
Updates an environment. The environment's **name** and **description** parameters can be changed. You must specify a **name** for the environment.
updateEnvironmentOptions
- the UpdateEnvironmentOptions
containing the options for
the callServiceCall
with a result of type Environment
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteEnvironmentResponse> deleteEnvironment(DeleteEnvironmentOptions deleteEnvironmentOptions)
deleteEnvironmentOptions
- the DeleteEnvironmentOptions
containing the options for
the callServiceCall
with a result of type DeleteEnvironmentResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionFieldsResponse> listFields(ListFieldsOptions listFieldsOptions)
Gets a list of the unique fields (and their types) stored in the indexes of the specified collections.
listFieldsOptions
- the ListFieldsOptions
containing the options for the callServiceCall
with a result of type ListCollectionFieldsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<Configuration> createConfiguration(CreateConfigurationOptions createConfigurationOptions)
Creates a new configuration.
If the input configuration contains the **configuration_id**, **created**, or **updated** properties, then they are ignored and overridden by the system, and an error is not returned so that the overridden fields do not need to be removed when copying a configuration.
The configuration can contain unrecognized JSON fields. Any such fields are ignored and do not generate an error. This makes it easier to use newer configuration files with older versions of the API and the service. It also makes it possible for the tooling to add additional metadata and information to the configuration.
createConfigurationOptions
- the CreateConfigurationOptions
containing the options
for the callServiceCall
with a result of type Configuration
public com.ibm.cloud.sdk.core.http.ServiceCall<ListConfigurationsResponse> listConfigurations(ListConfigurationsOptions listConfigurationsOptions)
Lists existing configurations for the service instance.
listConfigurationsOptions
- the ListConfigurationsOptions
containing the options
for the callServiceCall
with a result of type ListConfigurationsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<Configuration> getConfiguration(GetConfigurationOptions getConfigurationOptions)
getConfigurationOptions
- the GetConfigurationOptions
containing the options for
the callServiceCall
with a result of type Configuration
public com.ibm.cloud.sdk.core.http.ServiceCall<Configuration> updateConfiguration(UpdateConfigurationOptions updateConfigurationOptions)
Replaces an existing configuration. * Completely replaces the original configuration. * The **configuration_id**, **updated**, and **created** fields are accepted in the request, but they are ignored, and an error is not generated. It is also acceptable for users to submit an updated configuration with none of the three properties. * Documents are processed with a snapshot of the configuration as it was at the time the document was submitted to be ingested. This means that already submitted documents will not see any updates made to the configuration.
updateConfigurationOptions
- the UpdateConfigurationOptions
containing the options
for the callServiceCall
with a result of type Configuration
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteConfigurationResponse> deleteConfiguration(DeleteConfigurationOptions deleteConfigurationOptions)
The deletion is performed unconditionally. A configuration deletion request succeeds even if the configuration is referenced by a collection or document ingestion. However, documents that have already been submitted for processing continue to use the deleted configuration. Documents are always processed with a snapshot of the configuration as it existed at the time the document was submitted.
deleteConfigurationOptions
- the DeleteConfigurationOptions
containing the options
for the callServiceCall
with a result of type DeleteConfigurationResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> createCollection(CreateCollectionOptions createCollectionOptions)
createCollectionOptions
- the CreateCollectionOptions
containing the options for
the callServiceCall
with a result of type Collection
public com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionsResponse> listCollections(ListCollectionsOptions listCollectionsOptions)
Lists existing collections for the service instance.
listCollectionsOptions
- the ListCollectionsOptions
containing the options for the
callServiceCall
with a result of type ListCollectionsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> getCollection(GetCollectionOptions getCollectionOptions)
getCollectionOptions
- the GetCollectionOptions
containing the options for the
callServiceCall
with a result of type Collection
public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> updateCollection(UpdateCollectionOptions updateCollectionOptions)
updateCollectionOptions
- the UpdateCollectionOptions
containing the options for
the callServiceCall
with a result of type Collection
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteCollectionResponse> deleteCollection(DeleteCollectionOptions deleteCollectionOptions)
deleteCollectionOptions
- the DeleteCollectionOptions
containing the options for
the callServiceCall
with a result of type DeleteCollectionResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionFieldsResponse> listCollectionFields(ListCollectionFieldsOptions listCollectionFieldsOptions)
Gets a list of the unique fields (and their types) stored in the index.
listCollectionFieldsOptions
- the ListCollectionFieldsOptions
containing the
options for the callServiceCall
with a result of type ListCollectionFieldsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<Expansions> listExpansions(ListExpansionsOptions listExpansionsOptions)
Returns the current expansion list for the specified collection. If an expansion list is not specified, an object with empty expansion arrays is returned.
listExpansionsOptions
- the ListExpansionsOptions
containing the options for the
callServiceCall
with a result of type Expansions
public com.ibm.cloud.sdk.core.http.ServiceCall<Expansions> createExpansions(CreateExpansionsOptions createExpansionsOptions)
Create or replace the Expansion list for this collection. The maximum number of expanded terms per collection is `500`. The current expansion list is replaced with the uploaded content.
createExpansionsOptions
- the CreateExpansionsOptions
containing the options for
the callServiceCall
with a result of type Expansions
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteExpansions(DeleteExpansionsOptions deleteExpansionsOptions)
Remove the expansion information for this collection. The expansion list must be deleted to disable query expansion for a collection.
deleteExpansionsOptions
- the DeleteExpansionsOptions
containing the options for
the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> getTokenizationDictionaryStatus(GetTokenizationDictionaryStatusOptions getTokenizationDictionaryStatusOptions)
Returns the current status of the tokenization dictionary for the specified collection.
getTokenizationDictionaryStatusOptions
- the GetTokenizationDictionaryStatusOptions
containing the options for the callServiceCall
with a result of type TokenDictStatusResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> createTokenizationDictionary(CreateTokenizationDictionaryOptions createTokenizationDictionaryOptions)
Upload a custom tokenization dictionary to use with the specified collection.
createTokenizationDictionaryOptions
- the CreateTokenizationDictionaryOptions
containing the options for the callServiceCall
with a result of type TokenDictStatusResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteTokenizationDictionary(DeleteTokenizationDictionaryOptions deleteTokenizationDictionaryOptions)
Delete the tokenization dictionary from the collection.
deleteTokenizationDictionaryOptions
- the DeleteTokenizationDictionaryOptions
containing the options for the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> getStopwordListStatus(GetStopwordListStatusOptions getStopwordListStatusOptions)
Returns the current status of the stopword list for the specified collection.
getStopwordListStatusOptions
- the GetStopwordListStatusOptions
containing the
options for the callServiceCall
with a result of type TokenDictStatusResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> createStopwordList(CreateStopwordListOptions createStopwordListOptions)
Upload a custom stopword list to use with the specified collection.
createStopwordListOptions
- the CreateStopwordListOptions
containing the options
for the callServiceCall
with a result of type TokenDictStatusResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteStopwordList(DeleteStopwordListOptions deleteStopwordListOptions)
Delete a custom stopword list from the collection. After a custom stopword list is deleted, the default list is used for the collection.
deleteStopwordListOptions
- the DeleteStopwordListOptions
containing the options
for the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<DocumentAccepted> addDocument(AddDocumentOptions addDocumentOptions)
Add a document to a collection with optional metadata.
* The **version** query parameter is still required.
* Returns immediately after the system has accepted the document for processing.
* The user must provide document content, metadata, or both. If the request is missing both document content and metadata, it is rejected.
* The user can set the **Content-Type** parameter on the **file** part to indicate the media type of the document. If the **Content-Type** parameter is missing or is one of the generic media types (for example, `application/octet-stream`), then the service attempts to automatically detect the document's media type.
* The following field names are reserved and will be filtered out if present after normalization: `id`, `score`, `highlight`, and any field with the prefix of: `_`, `+`, or `-`
* Fields with empty name values after normalization are filtered out before indexing.
* Fields containing the following characters after normalization are filtered out before indexing: `#` and `,`
**Note:** Documents can be added with a specific **document_id** by using the **_/v1/environments/{environment_id}/collections/{collection_id}/documents** method.
addDocumentOptions
- the AddDocumentOptions
containing the options for the callServiceCall
with a result of type DocumentAccepted
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentStatus> getDocumentStatus(GetDocumentStatusOptions getDocumentStatusOptions)
Fetch status details about a submitted document. **Note:** this operation does not return the document itself. Instead, it returns only the document's processing status and any notices (warnings or errors) that were generated when the document was ingested. Use the query API to retrieve the actual document content.
getDocumentStatusOptions
- the GetDocumentStatusOptions
containing the options for
the callServiceCall
with a result of type DocumentStatus
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentAccepted> updateDocument(UpdateDocumentOptions updateDocumentOptions)
Replace an existing document or add a document with a specified **document_id**. Starts ingesting a document with optional metadata.
**Note:** When uploading a new document with this method it automatically replaces any document stored with the same **document_id** if it exists.
updateDocumentOptions
- the UpdateDocumentOptions
containing the options for the
callServiceCall
with a result of type DocumentAccepted
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteDocumentResponse> deleteDocument(DeleteDocumentOptions deleteDocumentOptions)
If the given document ID is invalid, or if the document is not found, then the a success response is returned (HTTP status code `200`) with the status set to 'deleted'.
deleteDocumentOptions
- the DeleteDocumentOptions
containing the options for the
callServiceCall
with a result of type DeleteDocumentResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<QueryResponse> query(QueryOptions queryOptions)
By using this method, you can construct long queries. For details, see the [Discovery documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts).
queryOptions
- the QueryOptions
containing the options for the callServiceCall
with a result of type QueryResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<QueryNoticesResponse> queryNotices(QueryNoticesOptions queryNoticesOptions)
Queries for notices (errors or warnings) that might have been generated by the system. Notices are generated when ingesting documents and performing relevance training. See the [Discovery documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts) for more details on the query language.
queryNoticesOptions
- the QueryNoticesOptions
containing the options for the callServiceCall
with a result of type QueryNoticesResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<QueryResponse> federatedQuery(FederatedQueryOptions federatedQueryOptions)
By using this method, you can construct long queries that search multiple collection. For details, see the [Discovery documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts).
federatedQueryOptions
- the FederatedQueryOptions
containing the options for the
callServiceCall
with a result of type QueryResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<QueryNoticesResponse> federatedQueryNotices(FederatedQueryNoticesOptions federatedQueryNoticesOptions)
Queries for notices (errors or warnings) that might have been generated by the system. Notices are generated when ingesting documents and performing relevance training. See the [Discovery documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts) for more details on the query language.
federatedQueryNoticesOptions
- the FederatedQueryNoticesOptions
containing the
options for the callServiceCall
with a result of type QueryNoticesResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<Completions> getAutocompletion(GetAutocompletionOptions getAutocompletionOptions)
Returns completion query suggestions for the specified prefix. /n/n **Important:** this method is only valid when using the Cloud Pak version of Discovery.
getAutocompletionOptions
- the GetAutocompletionOptions
containing the options for
the callServiceCall
with a result of type Completions
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingDataSet> listTrainingData(ListTrainingDataOptions listTrainingDataOptions)
Lists the training data for the specified collection.
listTrainingDataOptions
- the ListTrainingDataOptions
containing the options for
the callServiceCall
with a result of type TrainingDataSet
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> addTrainingData(AddTrainingDataOptions addTrainingDataOptions)
Adds a query to the training data for this collection. The query can contain a filter and natural language query.
addTrainingDataOptions
- the AddTrainingDataOptions
containing the options for the
callServiceCall
with a result of type TrainingQuery
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteAllTrainingData(DeleteAllTrainingDataOptions deleteAllTrainingDataOptions)
Deletes all training data from a collection.
deleteAllTrainingDataOptions
- the DeleteAllTrainingDataOptions
containing the
options for the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> getTrainingData(GetTrainingDataOptions getTrainingDataOptions)
Gets details for a specific training data query, including the query string and all examples.
getTrainingDataOptions
- the GetTrainingDataOptions
containing the options for the
callServiceCall
with a result of type TrainingQuery
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteTrainingData(DeleteTrainingDataOptions deleteTrainingDataOptions)
Removes the training data query and all associated examples from the training data set.
deleteTrainingDataOptions
- the DeleteTrainingDataOptions
containing the options
for the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExampleList> listTrainingExamples(ListTrainingExamplesOptions listTrainingExamplesOptions)
List all examples for this training data query.
listTrainingExamplesOptions
- the ListTrainingExamplesOptions
containing the
options for the callServiceCall
with a result of type TrainingExampleList
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExample> createTrainingExample(CreateTrainingExampleOptions createTrainingExampleOptions)
Adds a example to this training data query.
createTrainingExampleOptions
- the CreateTrainingExampleOptions
containing the
options for the callServiceCall
with a result of type TrainingExample
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteTrainingExample(DeleteTrainingExampleOptions deleteTrainingExampleOptions)
Deletes the example document with the given ID from the training data query.
deleteTrainingExampleOptions
- the DeleteTrainingExampleOptions
containing the
options for the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExample> updateTrainingExample(UpdateTrainingExampleOptions updateTrainingExampleOptions)
Changes the label or cross reference query for this training data example.
updateTrainingExampleOptions
- the UpdateTrainingExampleOptions
containing the
options for the callServiceCall
with a result of type TrainingExample
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExample> getTrainingExample(GetTrainingExampleOptions getTrainingExampleOptions)
Gets the details for this training example.
getTrainingExampleOptions
- the GetTrainingExampleOptions
containing the options
for the callServiceCall
with a result of type TrainingExample
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteUserData(DeleteUserDataOptions deleteUserDataOptions)
Deletes all data associated with a specified customer ID. The method has no effect if no data is associated with the customer ID.
You associate a customer ID with data by passing the **X-Watson-Metadata** header with a request that passes data. For more information about personal data and customer IDs, see [Information security](https://cloud.ibm.com/docs/discovery?topic=discovery-information-security#information-security).
deleteUserDataOptions
- the DeleteUserDataOptions
containing the options for the
callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<CreateEventResponse> createEvent(CreateEventOptions createEventOptions)
The **Events** API can be used to create log entries that are associated with specific queries. For example, you can record which documents in the results set were "clicked" by a user and when that click occurred.
createEventOptions
- the CreateEventOptions
containing the options for the callServiceCall
with a result of type CreateEventResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<LogQueryResponse> queryLog(QueryLogOptions queryLogOptions)
Searches the query and event log to find query sessions that match the specified criteria. Searching the **logs** endpoint uses the standard Discovery query syntax for the parameters that are supported.
queryLogOptions
- the QueryLogOptions
containing the options for the callServiceCall
with a result of type LogQueryResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<LogQueryResponse> queryLog()
Searches the query and event log to find query sessions that match the specified criteria. Searching the **logs** endpoint uses the standard Discovery query syntax for the parameters that are supported.
ServiceCall
with a result of type LogQueryResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQuery(GetMetricsQueryOptions getMetricsQueryOptions)
Total number of queries using the **natural_language_query** parameter over a specific time window.
getMetricsQueryOptions
- the GetMetricsQueryOptions
containing the options for the
callServiceCall
with a result of type MetricResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQuery()
Total number of queries using the **natural_language_query** parameter over a specific time window.
ServiceCall
with a result of type MetricResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQueryEvent(GetMetricsQueryEventOptions getMetricsQueryEventOptions)
Total number of queries using the **natural_language_query** parameter that have a corresponding "click" event over a specified time window. This metric requires having integrated event tracking in your application using the **Events** API.
getMetricsQueryEventOptions
- the GetMetricsQueryEventOptions
containing the
options for the callServiceCall
with a result of type MetricResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQueryEvent()
Total number of queries using the **natural_language_query** parameter that have a corresponding "click" event over a specified time window. This metric requires having integrated event tracking in your application using the **Events** API.
ServiceCall
with a result of type MetricResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQueryNoResults(GetMetricsQueryNoResultsOptions getMetricsQueryNoResultsOptions)
Total number of queries using the **natural_language_query** parameter that have no results returned over a specified time window.
getMetricsQueryNoResultsOptions
- the GetMetricsQueryNoResultsOptions
containing
the options for the callServiceCall
with a result of type MetricResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQueryNoResults()
Total number of queries using the **natural_language_query** parameter that have no results returned over a specified time window.
ServiceCall
with a result of type MetricResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsEventRate(GetMetricsEventRateOptions getMetricsEventRateOptions)
The percentage of queries using the **natural_language_query** parameter that have a corresponding "click" event over a specified time window. This metric requires having integrated event tracking in your application using the **Events** API.
getMetricsEventRateOptions
- the GetMetricsEventRateOptions
containing the options
for the callServiceCall
with a result of type MetricResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsEventRate()
The percentage of queries using the **natural_language_query** parameter that have a corresponding "click" event over a specified time window. This metric requires having integrated event tracking in your application using the **Events** API.
ServiceCall
with a result of type MetricResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricTokenResponse> getMetricsQueryTokenEvent(GetMetricsQueryTokenEventOptions getMetricsQueryTokenEventOptions)
The most frequent query tokens parsed from the **natural_language_query** parameter and their corresponding "click" event rate within the recording period (queries and events are stored for 30 days). A query token is an individual word or unigram within the query string.
getMetricsQueryTokenEventOptions
- the GetMetricsQueryTokenEventOptions
containing
the options for the callServiceCall
with a result of type MetricTokenResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricTokenResponse> getMetricsQueryTokenEvent()
The most frequent query tokens parsed from the **natural_language_query** parameter and their corresponding "click" event rate within the recording period (queries and events are stored for 30 days). A query token is an individual word or unigram within the query string.
ServiceCall
with a result of type MetricTokenResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<CredentialsList> listCredentials(ListCredentialsOptions listCredentialsOptions)
List all the source credentials that have been created for this service instance.
**Note:** All credentials are sent over an encrypted connection and encrypted at rest.
listCredentialsOptions
- the ListCredentialsOptions
containing the options for the
callServiceCall
with a result of type CredentialsList
public com.ibm.cloud.sdk.core.http.ServiceCall<Credentials> createCredentials(CreateCredentialsOptions createCredentialsOptions)
Creates a set of credentials to connect to a remote source. Created credentials are used in a configuration to associate a collection with the remote source.
**Note:** All credentials are sent over an encrypted connection and encrypted at rest.
createCredentialsOptions
- the CreateCredentialsOptions
containing the options for
the callServiceCall
with a result of type Credentials
public com.ibm.cloud.sdk.core.http.ServiceCall<Credentials> getCredentials(GetCredentialsOptions getCredentialsOptions)
Returns details about the specified credentials.
**Note:** Secure credential information such as a password or SSH key is never returned and must be obtained from the source system.
getCredentialsOptions
- the GetCredentialsOptions
containing the options for the
callServiceCall
with a result of type Credentials
public com.ibm.cloud.sdk.core.http.ServiceCall<Credentials> updateCredentials(UpdateCredentialsOptions updateCredentialsOptions)
Updates an existing set of source credentials.
**Note:** All credentials are sent over an encrypted connection and encrypted at rest.
updateCredentialsOptions
- the UpdateCredentialsOptions
containing the options for
the callServiceCall
with a result of type Credentials
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteCredentials> deleteCredentials(DeleteCredentialsOptions deleteCredentialsOptions)
Deletes a set of stored credentials from your Discovery instance.
deleteCredentialsOptions
- the DeleteCredentialsOptions
containing the options for
the callServiceCall
with a result of type DeleteCredentials
public com.ibm.cloud.sdk.core.http.ServiceCall<GatewayList> listGateways(ListGatewaysOptions listGatewaysOptions)
List the currently configured gateways.
listGatewaysOptions
- the ListGatewaysOptions
containing the options for the callServiceCall
with a result of type GatewayList
public com.ibm.cloud.sdk.core.http.ServiceCall<Gateway> createGateway(CreateGatewayOptions createGatewayOptions)
Create a gateway configuration to use with a remotely installed gateway.
createGatewayOptions
- the CreateGatewayOptions
containing the options for the
callServiceCall
with a result of type Gateway
public com.ibm.cloud.sdk.core.http.ServiceCall<Gateway> getGateway(GetGatewayOptions getGatewayOptions)
List information about the specified gateway.
getGatewayOptions
- the GetGatewayOptions
containing the options for the callServiceCall
with a result of type Gateway
public com.ibm.cloud.sdk.core.http.ServiceCall<GatewayDelete> deleteGateway(DeleteGatewayOptions deleteGatewayOptions)
Delete the specified gateway configuration.
deleteGatewayOptions
- the DeleteGatewayOptions
containing the options for the
callServiceCall
with a result of type GatewayDelete
Copyright © 2024 IBM Cloud. All rights reserved.