public class Discovery
extends com.ibm.cloud.sdk.core.service.BaseService
API Version: 2.0 See: https://cloud.ibm.com/docs/discovery-data
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<AnalyzedDocument> |
analyzeDocument(AnalyzeDocumentOptions analyzeDocumentOptions)
Analyze a Document.
|
com.ibm.cloud.sdk.core.http.ServiceCall<CollectionDetails> |
createCollection(CreateCollectionOptions createCollectionOptions)
Create a collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifier> |
createDocumentClassifier(CreateDocumentClassifierOptions createDocumentClassifierOptions)
Create a document classifier.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifierModel> |
createDocumentClassifierModel(CreateDocumentClassifierModelOptions createDocumentClassifierModelOptions)
Create a document classifier model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Enrichment> |
createEnrichment(CreateEnrichmentOptions createEnrichmentOptions)
Create an enrichment.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Expansions> |
createExpansions(CreateExpansionsOptions createExpansionsOptions)
Create or update an expansion list.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ProjectDetails> |
createProject(CreateProjectOptions createProjectOptions)
Create a project.
|
com.ibm.cloud.sdk.core.http.ServiceCall<StopWordList> |
createStopwordList(CreateStopwordListOptions createStopwordListOptions)
Create a custom stop words list.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> |
createTrainingQuery(CreateTrainingQueryOptions createTrainingQueryOptions)
Create training query.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteCollection(DeleteCollectionOptions deleteCollectionOptions)
Delete a collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DeleteDocumentResponse> |
deleteDocument(DeleteDocumentOptions deleteDocumentOptions)
Delete a document.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteDocumentClassifier(DeleteDocumentClassifierOptions deleteDocumentClassifierOptions)
Delete a document classifier.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteDocumentClassifierModel(DeleteDocumentClassifierModelOptions deleteDocumentClassifierModelOptions)
Delete a document classifier model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteEnrichment(DeleteEnrichmentOptions deleteEnrichmentOptions)
Delete an enrichment.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteExpansions(DeleteExpansionsOptions deleteExpansionsOptions)
Delete the expansion list.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteProject(DeleteProjectOptions deleteProjectOptions)
Delete a project.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteStopwordList(DeleteStopwordListOptions deleteStopwordListOptions)
Delete a custom stop words list.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteTrainingQueries(DeleteTrainingQueriesOptions deleteTrainingQueriesOptions)
Delete training queries.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteTrainingQuery(DeleteTrainingQueryOptions deleteTrainingQueryOptions)
Delete a training data query.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Void> |
deleteUserData(DeleteUserDataOptions deleteUserDataOptions)
Delete labeled data.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Completions> |
getAutocompletion(GetAutocompletionOptions getAutocompletionOptions)
Get Autocomplete Suggestions.
|
com.ibm.cloud.sdk.core.http.ServiceCall<CollectionDetails> |
getCollection(GetCollectionOptions getCollectionOptions)
Get collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ComponentSettingsResponse> |
getComponentSettings(GetComponentSettingsOptions getComponentSettingsOptions)
List component settings.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentDetails> |
getDocument(GetDocumentOptions getDocumentOptions)
Get document details.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifier> |
getDocumentClassifier(GetDocumentClassifierOptions getDocumentClassifierOptions)
Get a document classifier.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifierModel> |
getDocumentClassifierModel(GetDocumentClassifierModelOptions getDocumentClassifierModelOptions)
Get a document classifier model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Enrichment> |
getEnrichment(GetEnrichmentOptions getEnrichmentOptions)
Get enrichment.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ProjectDetails> |
getProject(GetProjectOptions getProjectOptions)
Get project.
|
com.ibm.cloud.sdk.core.http.ServiceCall<StopWordList> |
getStopwordList(GetStopwordListOptions getStopwordListOptions)
Get a custom stop words list.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> |
getTrainingQuery(GetTrainingQueryOptions getTrainingQueryOptions)
Get a training data query.
|
String |
getVersion()
Gets the version.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionsResponse> |
listCollections(ListCollectionsOptions listCollectionsOptions)
List collections.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifierModels> |
listDocumentClassifierModels(ListDocumentClassifierModelsOptions listDocumentClassifierModelsOptions)
List document classifier models.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifiers> |
listDocumentClassifiers(ListDocumentClassifiersOptions listDocumentClassifiersOptions)
List document classifiers.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListDocumentsResponse> |
listDocuments(ListDocumentsOptions listDocumentsOptions)
List documents.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Enrichments> |
listEnrichments(ListEnrichmentsOptions listEnrichmentsOptions)
List enrichments.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Expansions> |
listExpansions(ListExpansionsOptions listExpansionsOptions)
Get the expansion list.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListFieldsResponse> |
listFields(ListFieldsOptions listFieldsOptions)
List fields.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListProjectsResponse> |
listProjects()
List projects.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListProjectsResponse> |
listProjects(ListProjectsOptions listProjectsOptions)
List projects.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuerySet> |
listTrainingQueries(ListTrainingQueriesOptions listTrainingQueriesOptions)
List training queries.
|
com.ibm.cloud.sdk.core.http.ServiceCall<QueryResponse> |
query(QueryOptions queryOptions)
Query a project.
|
com.ibm.cloud.sdk.core.http.ServiceCall<QueryNoticesResponse> |
queryCollectionNotices(QueryCollectionNoticesOptions queryCollectionNoticesOptions)
Query collection notices.
|
com.ibm.cloud.sdk.core.http.ServiceCall<QueryNoticesResponse> |
queryNotices(QueryNoticesOptions queryNoticesOptions)
Query project notices.
|
void |
setVersion(String version)
Sets the version.
|
com.ibm.cloud.sdk.core.http.ServiceCall<CollectionDetails> |
updateCollection(UpdateCollectionOptions updateCollectionOptions)
Update a collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentAccepted> |
updateDocument(UpdateDocumentOptions updateDocumentOptions)
Update a document.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifier> |
updateDocumentClassifier(UpdateDocumentClassifierOptions updateDocumentClassifierOptions)
Update a document classifier.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifierModel> |
updateDocumentClassifierModel(UpdateDocumentClassifierModelOptions updateDocumentClassifierModelOptions)
Update a document classifier model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Enrichment> |
updateEnrichment(UpdateEnrichmentOptions updateEnrichmentOptions)
Update an enrichment.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ProjectDetails> |
updateProject(UpdateProjectOptions updateProjectOptions)
Update a project.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> |
updateTrainingQuery(UpdateTrainingQueryOptions updateTrainingQueryOptions)
Update a training query.
|
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 `2020-08-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 `2020-08-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 `2020-08-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 `2020-08-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 `2020-08-30`.
public void setVersion(String version)
version
- the new versionpublic com.ibm.cloud.sdk.core.http.ServiceCall<ListProjectsResponse> listProjects(ListProjectsOptions listProjectsOptions)
Lists existing projects for this instance.
listProjectsOptions
- the ListProjectsOptions
containing the options for the callServiceCall
with a result of type ListProjectsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<ListProjectsResponse> listProjects()
Lists existing projects for this instance.
ServiceCall
with a result of type ListProjectsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<ProjectDetails> createProject(CreateProjectOptions createProjectOptions)
Create a new project for this instance.
createProjectOptions
- the CreateProjectOptions
containing the options for the
callServiceCall
with a result of type ProjectDetails
public com.ibm.cloud.sdk.core.http.ServiceCall<ProjectDetails> getProject(GetProjectOptions getProjectOptions)
Get details on the specified project.
getProjectOptions
- the GetProjectOptions
containing the options for the callServiceCall
with a result of type ProjectDetails
public com.ibm.cloud.sdk.core.http.ServiceCall<ProjectDetails> updateProject(UpdateProjectOptions updateProjectOptions)
Update the specified project's name.
updateProjectOptions
- the UpdateProjectOptions
containing the options for the
callServiceCall
with a result of type ProjectDetails
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteProject(DeleteProjectOptions deleteProjectOptions)
Deletes the specified project.
**Important:** Deleting a project deletes everything that is part of the specified project, including all collections.
deleteProjectOptions
- the DeleteProjectOptions
containing the options for the
callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<ListFieldsResponse> listFields(ListFieldsOptions listFieldsOptions)
Gets a list of the unique fields (and their types) stored in the specified collections.
listFieldsOptions
- the ListFieldsOptions
containing the options for the callServiceCall
with a result of type ListFieldsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionsResponse> listCollections(ListCollectionsOptions listCollectionsOptions)
Lists existing collections for the specified project.
listCollectionsOptions
- the ListCollectionsOptions
containing the options for the
callServiceCall
with a result of type ListCollectionsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<CollectionDetails> createCollection(CreateCollectionOptions createCollectionOptions)
Create a new collection in the specified project.
createCollectionOptions
- the CreateCollectionOptions
containing the options for
the callServiceCall
with a result of type CollectionDetails
public com.ibm.cloud.sdk.core.http.ServiceCall<CollectionDetails> getCollection(GetCollectionOptions getCollectionOptions)
Get details about the specified collection.
getCollectionOptions
- the GetCollectionOptions
containing the options for the
callServiceCall
with a result of type CollectionDetails
public com.ibm.cloud.sdk.core.http.ServiceCall<CollectionDetails> updateCollection(UpdateCollectionOptions updateCollectionOptions)
Updates the specified collection's name, description, and enrichments.
updateCollectionOptions
- the UpdateCollectionOptions
containing the options for
the callServiceCall
with a result of type CollectionDetails
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteCollection(DeleteCollectionOptions deleteCollectionOptions)
Deletes the specified collection from the project. All documents stored in the specified collection and not shared is also deleted.
deleteCollectionOptions
- the DeleteCollectionOptions
containing the options for
the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<ListDocumentsResponse> listDocuments(ListDocumentsOptions listDocumentsOptions)
Lists the documents in the specified collection. The list includes only the document ID of each document and returns information for up to 10,000 documents.
**Note**: This method is available only from Cloud Pak for Data version 4.0.9 and later installed instances and from Plus and Enterprise plan IBM Cloud-managed instances. It is not currently available from Premium plan instances.
listDocumentsOptions
- the ListDocumentsOptions
containing the options for the
callServiceCall
with a result of type ListDocumentsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentAccepted> addDocument(AddDocumentOptions addDocumentOptions)
Add a document to a collection with optional metadata.
Returns immediately after the system has accepted the document for processing.
Use this method to upload a file to the collection. You cannot use this method to crawl an external data source.
* For a list of supported file types, see the [product documentation](/docs/discovery-data?topic=discovery-data-collections#supportedfiletypes).
* You must provide document content, metadata, or both. If the request is missing both document content and metadata, it is rejected.
* You 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.
* If the document is uploaded to a collection that shares its data with another collection, the **X-Watson-Discovery-Force** header must be set to `true`.
* In curl requests only, you can assign an ID to a document that you add by appending the ID to the endpoint (`/v2/projects/{project_id}/collections/{collection_id}/documents/{document_id}`). If a document already exists with the specified ID, it is replaced.
For more information about how certain file types and field names are handled when a file is added to a collection, see the [product documentation](/docs/discovery-data?topic=discovery-data-index-overview#field-name-limits).
addDocumentOptions
- the AddDocumentOptions
containing the options for the callServiceCall
with a result of type DocumentAccepted
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentDetails> getDocument(GetDocumentOptions getDocumentOptions)
Get details about a specific document, whether the document is added by uploading a file or by crawling an external data source.
**Note**: This method is available only from Cloud Pak for Data version 4.0.9 and later installed instances and from Plus and Enterprise plan IBM Cloud-managed instances. It is not currently available from Premium plan instances.
getDocumentOptions
- the GetDocumentOptions
containing the options for the callServiceCall
with a result of type DocumentDetails
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.
Use this method to upload a file to a collection. You cannot use this method to crawl an external data source.
If the document is uploaded to a collection that shares its data with another collection, the **X-Watson-Discovery-Force** header must be set to `true`.
**Notes:**
* Uploading a new document with this method automatically replaces any existing document stored with the same document ID.
* If an uploaded document is split into child documents during ingestion, all existing child documents are overwritten, even if the updated version of the document has fewer child documents.
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)
Deletes the document with the document ID that you specify from the collection. Removes uploaded documents from the collection permanently. If you delete a document that was added by crawling an external data source, the document will be added again with the next scheduled crawl of the data source. The delete function removes the document from the collection, not from the external data source.
**Note:** Files such as CSV or JSON files generate subdocuments when they are added to a collection. If you delete a subdocument, and then repeat the action that created it, the deleted document is added back in to your collection. To remove subdocuments that are generated by an uploaded file, delete the original document instead. You can get the document ID of the original document from the `parent_document_id` of the subdocument result.
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)
Search your data by submitting queries that are written in natural language or formatted in the Discovery Query Language. For more information, see the [Discovery documentation](/docs/discovery-data?topic=discovery-data-query-concepts). The default query parameters differ by project type. For more information about the project default settings, see the [Discovery documentation](/docs/discovery-data?topic=discovery-data-query-defaults). See [the Projects API documentation](#create-project) for details about how to set custom default query settings.
The length of the UTF-8 encoding of the POST body cannot exceed 10,000 bytes, which is roughly equivalent to 10,000 characters in English.
queryOptions
- the QueryOptions
containing the options for the callServiceCall
with a result of type QueryResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<Completions> getAutocompletion(GetAutocompletionOptions getAutocompletionOptions)
Returns completion query suggestions for the specified prefix.
getAutocompletionOptions
- the GetAutocompletionOptions
containing the options for
the callServiceCall
with a result of type Completions
public com.ibm.cloud.sdk.core.http.ServiceCall<QueryNoticesResponse> queryCollectionNotices(QueryCollectionNoticesOptions queryCollectionNoticesOptions)
Finds collection-level notices (errors and warnings) that are generated when documents are ingested.
queryCollectionNoticesOptions
- the QueryCollectionNoticesOptions
containing the
options for the callServiceCall
with a result of type QueryNoticesResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<QueryNoticesResponse> queryNotices(QueryNoticesOptions queryNoticesOptions)
Finds project-level notices (errors and warnings). Currently, project-level notices are generated by relevancy training.
queryNoticesOptions
- the QueryNoticesOptions
containing the options for the callServiceCall
with a result of type QueryNoticesResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<StopWordList> getStopwordList(GetStopwordListOptions getStopwordListOptions)
Returns the custom stop words list that is used by the collection. For information about the default stop words lists that are applied to queries, see [the product documentation](/docs/discovery-data?topic=discovery-data-stopwords).
getStopwordListOptions
- the GetStopwordListOptions
containing the options for the
callServiceCall
with a result of type StopWordList
public com.ibm.cloud.sdk.core.http.ServiceCall<StopWordList> createStopwordList(CreateStopwordListOptions createStopwordListOptions)
Adds a list of custom stop words. Stop words are words that you want the service to ignore when they occur in a query because they're not useful in distinguishing the semantic meaning of the query. The stop words list cannot contain more than 1 million characters.
A default stop words list is used by all collections. The default list is applied both at indexing time and at query time. A custom stop words list that you add is used at query time only.
The custom stop words list augments the default stop words list; you cannot remove stop words. For information about the default stop words lists per language, see [the product documentation](/docs/discovery-data?topic=discovery-data-stopwords).
createStopwordListOptions
- the CreateStopwordListOptions
containing the options
for the callServiceCall
with a result of type StopWordList
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteStopwordList(DeleteStopwordListOptions deleteStopwordListOptions)
Deletes a custom stop words list to stop using it in queries against the collection. After a custom stop words list is deleted, the default stop words list is used.
deleteStopwordListOptions
- the DeleteStopwordListOptions
containing the options
for the callServiceCall
with a void resultpublic 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 empty expansions array 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)
Creates or replaces the expansion list for this collection. An expansion list introduces alternative wording for key terms that are mentioned in your collection. By identifying synonyms or common misspellings, you expand the scope of a query beyond exact matches. The maximum number of expanded terms allowed per collection is 5,000.
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)
Removes the expansion information for this collection. To disable query expansion for a collection, delete the expansion list.
deleteExpansionsOptions
- the DeleteExpansionsOptions
containing the options for
the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<ComponentSettingsResponse> getComponentSettings(GetComponentSettingsOptions getComponentSettingsOptions)
Returns default configuration settings for components.
getComponentSettingsOptions
- the GetComponentSettingsOptions
containing the
options for the callServiceCall
with a result of type ComponentSettingsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuerySet> listTrainingQueries(ListTrainingQueriesOptions listTrainingQueriesOptions)
List the training queries for the specified project.
listTrainingQueriesOptions
- the ListTrainingQueriesOptions
containing the options
for the callServiceCall
with a result of type TrainingQuerySet
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteTrainingQueries(DeleteTrainingQueriesOptions deleteTrainingQueriesOptions)
Removes all training queries for the specified project.
deleteTrainingQueriesOptions
- the DeleteTrainingQueriesOptions
containing the
options for the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> createTrainingQuery(CreateTrainingQueryOptions createTrainingQueryOptions)
Add a query to the training data for this project. The query can contain a filter and natural language query.
createTrainingQueryOptions
- the CreateTrainingQueryOptions
containing the options
for the callServiceCall
with a result of type TrainingQuery
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> getTrainingQuery(GetTrainingQueryOptions getTrainingQueryOptions)
Get details for a specific training data query, including the query string and all examples.
getTrainingQueryOptions
- the GetTrainingQueryOptions
containing the options for
the callServiceCall
with a result of type TrainingQuery
public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> updateTrainingQuery(UpdateTrainingQueryOptions updateTrainingQueryOptions)
Updates an existing training query and it's examples.
updateTrainingQueryOptions
- the UpdateTrainingQueryOptions
containing the options
for the callServiceCall
with a result of type TrainingQuery
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteTrainingQuery(DeleteTrainingQueryOptions deleteTrainingQueryOptions)
Removes details from a training data query, including the query string and all examples.
deleteTrainingQueryOptions
- the DeleteTrainingQueryOptions
containing the options
for the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<Enrichments> listEnrichments(ListEnrichmentsOptions listEnrichmentsOptions)
Lists the enrichments available to this project. The *Part of Speech* and *Sentiment of Phrases* enrichments might be listed, but are reserved for internal use only.
listEnrichmentsOptions
- the ListEnrichmentsOptions
containing the options for the
callServiceCall
with a result of type Enrichments
public com.ibm.cloud.sdk.core.http.ServiceCall<Enrichment> createEnrichment(CreateEnrichmentOptions createEnrichmentOptions)
Create an enrichment for use with the specified project. To apply the enrichment to a collection in the project, use the [Collections API](/apidocs/discovery-data#createcollection).
createEnrichmentOptions
- the CreateEnrichmentOptions
containing the options for
the callServiceCall
with a result of type Enrichment
public com.ibm.cloud.sdk.core.http.ServiceCall<Enrichment> getEnrichment(GetEnrichmentOptions getEnrichmentOptions)
Get details about a specific enrichment.
getEnrichmentOptions
- the GetEnrichmentOptions
containing the options for the
callServiceCall
with a result of type Enrichment
public com.ibm.cloud.sdk.core.http.ServiceCall<Enrichment> updateEnrichment(UpdateEnrichmentOptions updateEnrichmentOptions)
Updates an existing enrichment's name and description.
updateEnrichmentOptions
- the UpdateEnrichmentOptions
containing the options for
the callServiceCall
with a result of type Enrichment
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteEnrichment(DeleteEnrichmentOptions deleteEnrichmentOptions)
Deletes an existing enrichment from the specified project.
**Note:** Only enrichments that have been manually created can be deleted.
deleteEnrichmentOptions
- the DeleteEnrichmentOptions
containing the options for
the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifiers> listDocumentClassifiers(ListDocumentClassifiersOptions listDocumentClassifiersOptions)
Get a list of the document classifiers in a project. Returns only the name and classifier ID of each document classifier.
listDocumentClassifiersOptions
- the ListDocumentClassifiersOptions
containing the
options for the callServiceCall
with a result of type DocumentClassifiers
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifier> createDocumentClassifier(CreateDocumentClassifierOptions createDocumentClassifierOptions)
Create a document classifier. You can use the API to create a document classifier in any project type. After you create a document classifier, you can use the Enrichments API to create a classifier enrichment, and then the Collections API to apply the enrichment to a collection in the project.
**Note:** This method is supported on installed instances (IBM Cloud Pak for Data) or IBM Cloud-managed Premium or Enterprise plan instances.
createDocumentClassifierOptions
- the CreateDocumentClassifierOptions
containing
the options for the callServiceCall
with a result of type DocumentClassifier
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifier> getDocumentClassifier(GetDocumentClassifierOptions getDocumentClassifierOptions)
Get details about a specific document classifier.
getDocumentClassifierOptions
- the GetDocumentClassifierOptions
containing the
options for the callServiceCall
with a result of type DocumentClassifier
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifier> updateDocumentClassifier(UpdateDocumentClassifierOptions updateDocumentClassifierOptions)
Update the document classifier name or description, update the training data, or add or update the test data.
updateDocumentClassifierOptions
- the UpdateDocumentClassifierOptions
containing
the options for the callServiceCall
with a result of type DocumentClassifier
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteDocumentClassifier(DeleteDocumentClassifierOptions deleteDocumentClassifierOptions)
Deletes an existing document classifier from the specified project.
deleteDocumentClassifierOptions
- the DeleteDocumentClassifierOptions
containing
the options for the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifierModels> listDocumentClassifierModels(ListDocumentClassifierModelsOptions listDocumentClassifierModelsOptions)
Get a list of the document classifier models in a project. Returns only the name and model ID of each document classifier model.
listDocumentClassifierModelsOptions
- the ListDocumentClassifierModelsOptions
containing the options for the callServiceCall
with a result of type DocumentClassifierModels
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifierModel> createDocumentClassifierModel(CreateDocumentClassifierModelOptions createDocumentClassifierModelOptions)
Create a document classifier model by training a model that uses the data and classifier settings defined in the specified document classifier.
**Note:** This method is supported on installed intances (IBM Cloud Pak for Data) or IBM Cloud-managed Premium or Enterprise plan instances.
createDocumentClassifierModelOptions
- the CreateDocumentClassifierModelOptions
containing the options for the callServiceCall
with a result of type DocumentClassifierModel
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifierModel> getDocumentClassifierModel(GetDocumentClassifierModelOptions getDocumentClassifierModelOptions)
Get details about a specific document classifier model.
getDocumentClassifierModelOptions
- the GetDocumentClassifierModelOptions
containing the options for the callServiceCall
with a result of type DocumentClassifierModel
public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentClassifierModel> updateDocumentClassifierModel(UpdateDocumentClassifierModelOptions updateDocumentClassifierModelOptions)
Update the document classifier model name or description.
updateDocumentClassifierModelOptions
- the UpdateDocumentClassifierModelOptions
containing the options for the callServiceCall
with a result of type DocumentClassifierModel
public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteDocumentClassifierModel(DeleteDocumentClassifierModelOptions deleteDocumentClassifierModelOptions)
Deletes an existing document classifier model from the specified project.
deleteDocumentClassifierModelOptions
- the DeleteDocumentClassifierModelOptions
containing the options for the callServiceCall
with a void resultpublic com.ibm.cloud.sdk.core.http.ServiceCall<AnalyzedDocument> analyzeDocument(AnalyzeDocumentOptions analyzeDocumentOptions)
Process a document and return it for realtime use. Supports JSON files only.
The file is not stored in the collection, but is processed according to the collection's configuration settings. To get results, enrichments must be applied to a field in the collection that also exists in the file that you want to analyze. For example, to analyze text in a `Quote` field, you must apply enrichments to the `Quote` field in the collection configuration. Then, when you analyze the file, the text in the `Quote` field is analyzed and results are written to a field named `enriched_Quote`.
**Note:** This method is supported with Enterprise plan deployments and installed deployments only.
analyzeDocumentOptions
- the AnalyzeDocumentOptions
containing the options for the
callServiceCall
with a result of type AnalyzedDocument
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](/docs/discovery-data?topic=discovery-data-information-security#information-security).
**Note:** This method is only supported on IBM Cloud instances of Discovery.
deleteUserDataOptions
- the DeleteUserDataOptions
containing the options for the
callServiceCall
with a void resultCopyright © 2023 IBM Cloud. All rights reserved.