Class Discovery
public class Discovery
extends com.ibm.cloud.sdk.core.service.BaseService
API Version: 1.0 See: https://cloud.ibm.com/docs/discovery
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_SERVICE_NAME
static String
DEFAULT_SERVICE_URL
Fields inherited from class com.ibm.cloud.sdk.core.service.BaseService
PROPNAME_DISABLE_SSL, PROPNAME_ENABLE_GZIP, PROPNAME_URL
-
Constructor Summary
Constructors Constructor 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. -
Method Summary
Modifier and Type Method 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.Methods inherited from class com.ibm.cloud.sdk.core.service.BaseService
configureClient, configureService, constructServiceUrl, constructServiceURL, enableGzipCompression, getAuthenticator, getClient, getEndPoint, getName, getServiceUrl, isJsonMimeType, isJsonPatchMimeType, setClient, setDefaultHeaders, setEndPoint, setServiceUrl, toString
-
Field Details
-
DEFAULT_SERVICE_NAME
- See Also:
- Constant Field Values
-
DEFAULT_SERVICE_URL
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Discovery
Constructs an instance of the `Discovery` client. The default service name is used to configure the client instance.- Parameters:
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`.
-
Discovery
Constructs an instance of the `Discovery` client. The default service name and specified authenticator are used to configure the client instance.- Parameters:
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
- theAuthenticator
instance to be configured for this client
-
Discovery
Constructs an instance of the `Discovery` client. The specified service name is used to configure the client instance.- Parameters:
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 instance
-
Discovery
public Discovery(String version, String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)Constructs an instance of the `Discovery` client. The specified service name and authenticator are used to configure the client instance.- Parameters:
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
- theAuthenticator
instance to be configured for this client
-
-
Method Details
-
getVersion
Gets the 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`.
- Returns:
- the version
-
setVersion
Sets the version.- Parameters:
version
- the new version
-
createEnvironment
public com.ibm.cloud.sdk.core.http.ServiceCall<Environment> createEnvironment(CreateEnvironmentOptions createEnvironmentOptions)Create an environment.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.
- Parameters:
createEnvironmentOptions
- theCreateEnvironmentOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeEnvironment
-
listEnvironments
public com.ibm.cloud.sdk.core.http.ServiceCall<ListEnvironmentsResponse> listEnvironments(ListEnvironmentsOptions listEnvironmentsOptions)List environments.List existing environments for the service instance.
- Parameters:
listEnvironmentsOptions
- theListEnvironmentsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeListEnvironmentsResponse
-
listEnvironments
List environments.List existing environments for the service instance.
- Returns:
- a
ServiceCall
with a result of typeListEnvironmentsResponse
-
getEnvironment
public com.ibm.cloud.sdk.core.http.ServiceCall<Environment> getEnvironment(GetEnvironmentOptions getEnvironmentOptions)Get environment info.- Parameters:
getEnvironmentOptions
- theGetEnvironmentOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeEnvironment
-
updateEnvironment
public com.ibm.cloud.sdk.core.http.ServiceCall<Environment> updateEnvironment(UpdateEnvironmentOptions updateEnvironmentOptions)Update an environment.Updates an environment. The environment's **name** and **description** parameters can be changed. You must specify a **name** for the environment.
- Parameters:
updateEnvironmentOptions
- theUpdateEnvironmentOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeEnvironment
-
deleteEnvironment
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteEnvironmentResponse> deleteEnvironment(DeleteEnvironmentOptions deleteEnvironmentOptions)Delete environment.- Parameters:
deleteEnvironmentOptions
- theDeleteEnvironmentOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeDeleteEnvironmentResponse
-
listFields
public com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionFieldsResponse> listFields(ListFieldsOptions listFieldsOptions)List fields across collections.Gets a list of the unique fields (and their types) stored in the indexes of the specified collections.
- Parameters:
listFieldsOptions
- theListFieldsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeListCollectionFieldsResponse
-
createConfiguration
public com.ibm.cloud.sdk.core.http.ServiceCall<Configuration> createConfiguration(CreateConfigurationOptions createConfigurationOptions)Add configuration.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.
- Parameters:
createConfigurationOptions
- theCreateConfigurationOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeConfiguration
-
listConfigurations
public com.ibm.cloud.sdk.core.http.ServiceCall<ListConfigurationsResponse> listConfigurations(ListConfigurationsOptions listConfigurationsOptions)List configurations.Lists existing configurations for the service instance.
- Parameters:
listConfigurationsOptions
- theListConfigurationsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeListConfigurationsResponse
-
getConfiguration
public com.ibm.cloud.sdk.core.http.ServiceCall<Configuration> getConfiguration(GetConfigurationOptions getConfigurationOptions)Get configuration details.- Parameters:
getConfigurationOptions
- theGetConfigurationOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeConfiguration
-
updateConfiguration
public com.ibm.cloud.sdk.core.http.ServiceCall<Configuration> updateConfiguration(UpdateConfigurationOptions updateConfigurationOptions)Update a configuration.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.
- Parameters:
updateConfigurationOptions
- theUpdateConfigurationOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeConfiguration
-
deleteConfiguration
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteConfigurationResponse> deleteConfiguration(DeleteConfigurationOptions deleteConfigurationOptions)Delete a configuration.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.
- Parameters:
deleteConfigurationOptions
- theDeleteConfigurationOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeDeleteConfigurationResponse
-
createCollection
public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> createCollection(CreateCollectionOptions createCollectionOptions)Create a collection.- Parameters:
createCollectionOptions
- theCreateCollectionOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeCollection
-
listCollections
public com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionsResponse> listCollections(ListCollectionsOptions listCollectionsOptions)List collections.Lists existing collections for the service instance.
- Parameters:
listCollectionsOptions
- theListCollectionsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeListCollectionsResponse
-
getCollection
public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> getCollection(GetCollectionOptions getCollectionOptions)Get collection details.- Parameters:
getCollectionOptions
- theGetCollectionOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeCollection
-
updateCollection
public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> updateCollection(UpdateCollectionOptions updateCollectionOptions)Update a collection.- Parameters:
updateCollectionOptions
- theUpdateCollectionOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeCollection
-
deleteCollection
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteCollectionResponse> deleteCollection(DeleteCollectionOptions deleteCollectionOptions)Delete a collection.- Parameters:
deleteCollectionOptions
- theDeleteCollectionOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeDeleteCollectionResponse
-
listCollectionFields
public com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionFieldsResponse> listCollectionFields(ListCollectionFieldsOptions listCollectionFieldsOptions)List collection fields.Gets a list of the unique fields (and their types) stored in the index.
- Parameters:
listCollectionFieldsOptions
- theListCollectionFieldsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeListCollectionFieldsResponse
-
listExpansions
public com.ibm.cloud.sdk.core.http.ServiceCall<Expansions> listExpansions(ListExpansionsOptions listExpansionsOptions)Get the expansion list.Returns the current expansion list for the specified collection. If an expansion list is not specified, an object with empty expansion arrays is returned.
- Parameters:
listExpansionsOptions
- theListExpansionsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeExpansions
-
createExpansions
public com.ibm.cloud.sdk.core.http.ServiceCall<Expansions> createExpansions(CreateExpansionsOptions createExpansionsOptions)Create or update expansion list.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.
- Parameters:
createExpansionsOptions
- theCreateExpansionsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeExpansions
-
deleteExpansions
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteExpansions(DeleteExpansionsOptions deleteExpansionsOptions)Delete the expansion list.Remove the expansion information for this collection. The expansion list must be deleted to disable query expansion for a collection.
- Parameters:
deleteExpansionsOptions
- theDeleteExpansionsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
getTokenizationDictionaryStatus
public com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> getTokenizationDictionaryStatus(GetTokenizationDictionaryStatusOptions getTokenizationDictionaryStatusOptions)Get tokenization dictionary status.Returns the current status of the tokenization dictionary for the specified collection.
- Parameters:
getTokenizationDictionaryStatusOptions
- theGetTokenizationDictionaryStatusOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeTokenDictStatusResponse
-
createTokenizationDictionary
public com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> createTokenizationDictionary(CreateTokenizationDictionaryOptions createTokenizationDictionaryOptions)Create tokenization dictionary.Upload a custom tokenization dictionary to use with the specified collection.
- Parameters:
createTokenizationDictionaryOptions
- theCreateTokenizationDictionaryOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeTokenDictStatusResponse
-
deleteTokenizationDictionary
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteTokenizationDictionary(DeleteTokenizationDictionaryOptions deleteTokenizationDictionaryOptions)Delete tokenization dictionary.Delete the tokenization dictionary from the collection.
- Parameters:
deleteTokenizationDictionaryOptions
- theDeleteTokenizationDictionaryOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
getStopwordListStatus
public com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> getStopwordListStatus(GetStopwordListStatusOptions getStopwordListStatusOptions)Get stopword list status.Returns the current status of the stopword list for the specified collection.
- Parameters:
getStopwordListStatusOptions
- theGetStopwordListStatusOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeTokenDictStatusResponse
-
createStopwordList
public com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> createStopwordList(CreateStopwordListOptions createStopwordListOptions)Create stopword list.Upload a custom stopword list to use with the specified collection.
- Parameters:
createStopwordListOptions
- theCreateStopwordListOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeTokenDictStatusResponse
-
deleteStopwordList
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteStopwordList(DeleteStopwordListOptions deleteStopwordListOptions)Delete a custom stopword list.Delete a custom stopword list from the collection. After a custom stopword list is deleted, the default list is used for the collection.
- Parameters:
deleteStopwordListOptions
- theDeleteStopwordListOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
addDocument
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentAccepted> addDocument(AddDocumentOptions addDocumentOptions)Add a document.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.
- Parameters:
addDocumentOptions
- theAddDocumentOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeDocumentAccepted
-
getDocumentStatus
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentStatus> getDocumentStatus(GetDocumentStatusOptions getDocumentStatusOptions)Get document details.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.
- Parameters:
getDocumentStatusOptions
- theGetDocumentStatusOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeDocumentStatus
-
updateDocument
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentAccepted> updateDocument(UpdateDocumentOptions updateDocumentOptions)Update a document.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.
- Parameters:
updateDocumentOptions
- theUpdateDocumentOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeDocumentAccepted
-
deleteDocument
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteDocumentResponse> deleteDocument(DeleteDocumentOptions deleteDocumentOptions)Delete a document.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'.
- Parameters:
deleteDocumentOptions
- theDeleteDocumentOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeDeleteDocumentResponse
-
query
Query a collection.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).
- Parameters:
queryOptions
- theQueryOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeQueryResponse
-
queryNotices
public com.ibm.cloud.sdk.core.http.ServiceCall<QueryNoticesResponse> queryNotices(QueryNoticesOptions queryNoticesOptions)Query system notices.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.
- Parameters:
queryNoticesOptions
- theQueryNoticesOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeQueryNoticesResponse
-
federatedQuery
public com.ibm.cloud.sdk.core.http.ServiceCall<QueryResponse> federatedQuery(FederatedQueryOptions federatedQueryOptions)Query multiple collections.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).
- Parameters:
federatedQueryOptions
- theFederatedQueryOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeQueryResponse
-
federatedQueryNotices
public com.ibm.cloud.sdk.core.http.ServiceCall<QueryNoticesResponse> federatedQueryNotices(FederatedQueryNoticesOptions federatedQueryNoticesOptions)Query multiple collection system notices.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.
- Parameters:
federatedQueryNoticesOptions
- theFederatedQueryNoticesOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeQueryNoticesResponse
-
getAutocompletion
public com.ibm.cloud.sdk.core.http.ServiceCall<Completions> getAutocompletion(GetAutocompletionOptions getAutocompletionOptions)Get Autocomplete Suggestions.Returns completion query suggestions for the specified prefix. /n/n **Important:** this method is only valid when using the Cloud Pak version of Discovery.
- Parameters:
getAutocompletionOptions
- theGetAutocompletionOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeCompletions
-
listTrainingData
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingDataSet> listTrainingData(ListTrainingDataOptions listTrainingDataOptions)List training data.Lists the training data for the specified collection.
- Parameters:
listTrainingDataOptions
- theListTrainingDataOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeTrainingDataSet
-
addTrainingData
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> addTrainingData(AddTrainingDataOptions addTrainingDataOptions)Add query to training data.Adds a query to the training data for this collection. The query can contain a filter and natural language query.
- Parameters:
addTrainingDataOptions
- theAddTrainingDataOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeTrainingQuery
-
deleteAllTrainingData
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteAllTrainingData(DeleteAllTrainingDataOptions deleteAllTrainingDataOptions)Delete all training data.Deletes all training data from a collection.
- Parameters:
deleteAllTrainingDataOptions
- theDeleteAllTrainingDataOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
getTrainingData
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> getTrainingData(GetTrainingDataOptions getTrainingDataOptions)Get details about a query.Gets details for a specific training data query, including the query string and all examples.
- Parameters:
getTrainingDataOptions
- theGetTrainingDataOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeTrainingQuery
-
deleteTrainingData
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteTrainingData(DeleteTrainingDataOptions deleteTrainingDataOptions)Delete a training data query.Removes the training data query and all associated examples from the training data set.
- Parameters:
deleteTrainingDataOptions
- theDeleteTrainingDataOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
listTrainingExamples
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExampleList> listTrainingExamples(ListTrainingExamplesOptions listTrainingExamplesOptions)List examples for a training data query.List all examples for this training data query.
- Parameters:
listTrainingExamplesOptions
- theListTrainingExamplesOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeTrainingExampleList
-
createTrainingExample
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExample> createTrainingExample(CreateTrainingExampleOptions createTrainingExampleOptions)Add example to training data query.Adds a example to this training data query.
- Parameters:
createTrainingExampleOptions
- theCreateTrainingExampleOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeTrainingExample
-
deleteTrainingExample
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteTrainingExample(DeleteTrainingExampleOptions deleteTrainingExampleOptions)Delete example for training data query.Deletes the example document with the given ID from the training data query.
- Parameters:
deleteTrainingExampleOptions
- theDeleteTrainingExampleOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
updateTrainingExample
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExample> updateTrainingExample(UpdateTrainingExampleOptions updateTrainingExampleOptions)Change label or cross reference for example.Changes the label or cross reference query for this training data example.
- Parameters:
updateTrainingExampleOptions
- theUpdateTrainingExampleOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeTrainingExample
-
getTrainingExample
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExample> getTrainingExample(GetTrainingExampleOptions getTrainingExampleOptions)Get details for training data example.Gets the details for this training example.
- Parameters:
getTrainingExampleOptions
- theGetTrainingExampleOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeTrainingExample
-
deleteUserData
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteUserData(DeleteUserDataOptions deleteUserDataOptions)Delete labeled data.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).
- Parameters:
deleteUserDataOptions
- theDeleteUserDataOptions
containing the options for the call- Returns:
- a
ServiceCall
with a void result
-
createEvent
public com.ibm.cloud.sdk.core.http.ServiceCall<CreateEventResponse> createEvent(CreateEventOptions createEventOptions)Create event.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.
- Parameters:
createEventOptions
- theCreateEventOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeCreateEventResponse
-
queryLog
public com.ibm.cloud.sdk.core.http.ServiceCall<LogQueryResponse> queryLog(QueryLogOptions queryLogOptions)Search the query and event log.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.
- Parameters:
queryLogOptions
- theQueryLogOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeLogQueryResponse
-
queryLog
Search the query and event log.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.
- Returns:
- a
ServiceCall
with a result of typeLogQueryResponse
-
getMetricsQuery
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQuery(GetMetricsQueryOptions getMetricsQueryOptions)Number of queries over time.Total number of queries using the **natural_language_query** parameter over a specific time window.
- Parameters:
getMetricsQueryOptions
- theGetMetricsQueryOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeMetricResponse
-
getMetricsQuery
Number of queries over time.Total number of queries using the **natural_language_query** parameter over a specific time window.
- Returns:
- a
ServiceCall
with a result of typeMetricResponse
-
getMetricsQueryEvent
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQueryEvent(GetMetricsQueryEventOptions getMetricsQueryEventOptions)Number of queries with an event over time.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.
- Parameters:
getMetricsQueryEventOptions
- theGetMetricsQueryEventOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeMetricResponse
-
getMetricsQueryEvent
Number of queries with an event over time.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.
- Returns:
- a
ServiceCall
with a result of typeMetricResponse
-
getMetricsQueryNoResults
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQueryNoResults(GetMetricsQueryNoResultsOptions getMetricsQueryNoResultsOptions)Number of queries with no search results over time.Total number of queries using the **natural_language_query** parameter that have no results returned over a specified time window.
- Parameters:
getMetricsQueryNoResultsOptions
- theGetMetricsQueryNoResultsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeMetricResponse
-
getMetricsQueryNoResults
Number of queries with no search results over time.Total number of queries using the **natural_language_query** parameter that have no results returned over a specified time window.
- Returns:
- a
ServiceCall
with a result of typeMetricResponse
-
getMetricsEventRate
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsEventRate(GetMetricsEventRateOptions getMetricsEventRateOptions)Percentage of queries with an associated event.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.
- Parameters:
getMetricsEventRateOptions
- theGetMetricsEventRateOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeMetricResponse
-
getMetricsEventRate
Percentage of queries with an associated event.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.
- Returns:
- a
ServiceCall
with a result of typeMetricResponse
-
getMetricsQueryTokenEvent
public com.ibm.cloud.sdk.core.http.ServiceCall<MetricTokenResponse> getMetricsQueryTokenEvent(GetMetricsQueryTokenEventOptions getMetricsQueryTokenEventOptions)Most frequent query tokens with an event.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.
- Parameters:
getMetricsQueryTokenEventOptions
- theGetMetricsQueryTokenEventOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeMetricTokenResponse
-
getMetricsQueryTokenEvent
Most frequent query tokens with an event.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.
- Returns:
- a
ServiceCall
with a result of typeMetricTokenResponse
-
listCredentials
public com.ibm.cloud.sdk.core.http.ServiceCall<CredentialsList> listCredentials(ListCredentialsOptions listCredentialsOptions)List credentials.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.
- Parameters:
listCredentialsOptions
- theListCredentialsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeCredentialsList
-
createCredentials
public com.ibm.cloud.sdk.core.http.ServiceCall<Credentials> createCredentials(CreateCredentialsOptions createCredentialsOptions)Create credentials.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.
- Parameters:
createCredentialsOptions
- theCreateCredentialsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeCredentials
-
getCredentials
public com.ibm.cloud.sdk.core.http.ServiceCall<Credentials> getCredentials(GetCredentialsOptions getCredentialsOptions)View Credentials.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.
- Parameters:
getCredentialsOptions
- theGetCredentialsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeCredentials
-
updateCredentials
public com.ibm.cloud.sdk.core.http.ServiceCall<Credentials> updateCredentials(UpdateCredentialsOptions updateCredentialsOptions)Update credentials.Updates an existing set of source credentials.
**Note:** All credentials are sent over an encrypted connection and encrypted at rest.
- Parameters:
updateCredentialsOptions
- theUpdateCredentialsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeCredentials
-
deleteCredentials
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteCredentials> deleteCredentials(DeleteCredentialsOptions deleteCredentialsOptions)Delete credentials.Deletes a set of stored credentials from your Discovery instance.
- Parameters:
deleteCredentialsOptions
- theDeleteCredentialsOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeDeleteCredentials
-
listGateways
public com.ibm.cloud.sdk.core.http.ServiceCall<GatewayList> listGateways(ListGatewaysOptions listGatewaysOptions)List Gateways.List the currently configured gateways.
- Parameters:
listGatewaysOptions
- theListGatewaysOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeGatewayList
-
createGateway
public com.ibm.cloud.sdk.core.http.ServiceCall<Gateway> createGateway(CreateGatewayOptions createGatewayOptions)Create Gateway.Create a gateway configuration to use with a remotely installed gateway.
- Parameters:
createGatewayOptions
- theCreateGatewayOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeGateway
-
getGateway
public com.ibm.cloud.sdk.core.http.ServiceCall<Gateway> getGateway(GetGatewayOptions getGatewayOptions)List Gateway Details.List information about the specified gateway.
- Parameters:
getGatewayOptions
- theGetGatewayOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeGateway
-
deleteGateway
public com.ibm.cloud.sdk.core.http.ServiceCall<GatewayDelete> deleteGateway(DeleteGatewayOptions deleteGatewayOptions)Delete Gateway.Delete the specified gateway configuration.
- Parameters:
deleteGatewayOptions
- theDeleteGatewayOptions
containing the options for the call- Returns:
- a
ServiceCall
with a result of typeGatewayDelete
-