|
1 | 1 | /* |
2 | | - * (C) Copyright IBM Corp. 2019, 2022. |
| 2 | + * (C) Copyright IBM Corp. 2023. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
5 | 5 | * the License. You may obtain a copy of the License at |
|
12 | 12 | */ |
13 | 13 |
|
14 | 14 | /* |
15 | | - * IBM OpenAPI SDK Code Generator Version: 3.53.0-9710cac3-20220713-193508 |
| 15 | + * IBM OpenAPI SDK Code Generator Version: 3.64.1-cee95189-20230124-211647 |
16 | 16 | */ |
17 | 17 |
|
18 | 18 | package com.ibm.watson.discovery.v2; |
|
107 | 107 | import okhttp3.MultipartBody; |
108 | 108 |
|
109 | 109 | /** |
110 | | - * IBM Watson™ Discovery is a cognitive search and content analytics engine that you can |
111 | | - * add to applications to identify patterns, trends and actionable insights to drive better |
| 110 | + * IBM Watson® Discovery is a cognitive search and content analytics engine that you can add |
| 111 | + * to applications to identify patterns, trends and actionable insights to drive better |
112 | 112 | * decision-making. Securely unify structured and unstructured data with pre-enriched content, and |
113 | 113 | * use a simplified query language to eliminate the need for manual filtering of results. |
114 | 114 | * |
115 | 115 | * <p>API Version: 2.0 See: https://cloud.ibm.com/docs/discovery-data |
116 | 116 | */ |
117 | 117 | public class Discovery extends BaseService { |
118 | 118 |
|
| 119 | + /** Default service name used when configuring the `Discovery` client. */ |
119 | 120 | public static final String DEFAULT_SERVICE_NAME = "discovery"; |
120 | 121 |
|
| 122 | + /** Default service endpoint URL. */ |
121 | 123 | public static final String DEFAULT_SERVICE_URL = |
122 | 124 | "https://api.us-south.discovery.watson.cloud.ibm.com"; |
123 | 125 |
|
@@ -465,12 +467,6 @@ public ServiceCall<CollectionDetails> createCollection( |
465 | 467 | com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() |
466 | 468 | .toJsonTree(createCollectionOptions.enrichments())); |
467 | 469 | } |
468 | | - if (createCollectionOptions.smartDocumentUnderstanding() != null) { |
469 | | - contentJson.add( |
470 | | - "smart_document_understanding", |
471 | | - com.ibm.cloud.sdk.core.util.GsonSingleton.getGson() |
472 | | - .toJsonTree(createCollectionOptions.smartDocumentUnderstanding())); |
473 | | - } |
474 | 470 | builder.bodyJson(contentJson); |
475 | 471 | ResponseConverter<CollectionDetails> responseConverter = |
476 | 472 | ResponseConverterUtils.getValue( |
@@ -597,7 +593,8 @@ public ServiceCall<Void> deleteCollection(DeleteCollectionOptions deleteCollecti |
597 | 593 | * each document and returns information for up to 10,000 documents. |
598 | 594 | * |
599 | 595 | * <p>**Note**: This method is available only from Cloud Pak for Data version 4.0.9 and later |
600 | | - * installed instances and from Plus and Enterprise plan IBM Cloud-managed instances. |
| 596 | + * installed instances and from Plus and Enterprise plan IBM Cloud-managed instances. It is not |
| 597 | + * currently available from Premium plan instances. |
601 | 598 | * |
602 | 599 | * @param listDocumentsOptions the {@link ListDocumentsOptions} containing the options for the |
603 | 600 | * call |
@@ -653,8 +650,8 @@ public ServiceCall<ListDocumentsResponse> listDocuments( |
653 | 650 | * |
654 | 651 | * <p>Returns immediately after the system has accepted the document for processing. |
655 | 652 | * |
656 | | - * <p>This operation works with a file upload collection. It cannot be used to modify a collection |
657 | | - * that crawls an external data source. |
| 653 | + * <p>Use this method to upload a file to the collection. You cannot use this method to crawl an |
| 654 | + * external data source. |
658 | 655 | * |
659 | 656 | * <p>* For a list of supported file types, see the [product |
660 | 657 | * documentation](/docs/discovery-data?topic=discovery-data-collections#supportedfiletypes). |
@@ -731,7 +728,8 @@ public ServiceCall<DocumentAccepted> addDocument(AddDocumentOptions addDocumentO |
731 | 728 | * by crawling an external data source. |
732 | 729 | * |
733 | 730 | * <p>**Note**: This method is available only from Cloud Pak for Data version 4.0.9 and later |
734 | | - * installed instances and from Plus and Enterprise plan IBM Cloud-managed instances. |
| 731 | + * installed instances and from Plus and Enterprise plan IBM Cloud-managed instances. It is not |
| 732 | + * currently available from Premium plan instances. |
735 | 733 | * |
736 | 734 | * @param getDocumentOptions the {@link GetDocumentOptions} containing the options for the call |
737 | 735 | * @return a {@link ServiceCall} with a result of type {@link DocumentDetails} |
@@ -767,8 +765,8 @@ public ServiceCall<DocumentDetails> getDocument(GetDocumentOptions getDocumentOp |
767 | 765 | * <p>Replace an existing document or add a document with a specified document ID. Starts |
768 | 766 | * ingesting a document with optional metadata. |
769 | 767 | * |
770 | | - * <p>This operation works with a file upload collection. It cannot be used to modify a collection |
771 | | - * that crawls an external data source. |
| 768 | + * <p>Use this method to upload a file to a collection. You cannot use this method to crawl an |
| 769 | + * external data source. |
772 | 770 | * |
773 | 771 | * <p>If the document is uploaded to a collection that shares its data with another collection, |
774 | 772 | * the **X-Watson-Discovery-Force** header must be set to `true`. |
@@ -832,15 +830,17 @@ public ServiceCall<DocumentAccepted> updateDocument(UpdateDocumentOptions update |
832 | 830 | /** |
833 | 831 | * Delete a document. |
834 | 832 | * |
835 | | - * <p>If the given document ID is invalid, or if the document is not found, then the a success |
836 | | - * response is returned (HTTP status code `200`) with the status set to 'deleted'. |
837 | | - * |
838 | | - * <p>**Note:** This operation only works on collections created to accept direct file uploads. It |
839 | | - * cannot be used to modify a collection that connects to an external source such as Microsoft |
840 | | - * SharePoint. |
| 833 | + * <p>Deletes the document with the document ID that you specify from the collection. Removes |
| 834 | + * uploaded documents from the collection permanently. If you delete a document that was added by |
| 835 | + * crawling an external data source, the document will be added again with the next scheduled |
| 836 | + * crawl of the data source. The delete function removes the document from the collection, not |
| 837 | + * from the external data source. |
841 | 838 | * |
842 | | - * <p>**Note:** Segments of an uploaded document cannot be deleted individually. Delete all |
843 | | - * segments by deleting using the `parent_document_id` of a segment result. |
| 839 | + * <p>**Note:** Files such as CSV or JSON files generate subdocuments when they are added to a |
| 840 | + * collection. If you delete a subdocument, and then repeat the action that created it, the |
| 841 | + * deleted document is added back in to your collection. To remove subdocuments that are generated |
| 842 | + * by an uploaded file, delete the original document instead. You can get the document ID of the |
| 843 | + * original document from the `parent_document_id` of the subdocument result. |
844 | 844 | * |
845 | 845 | * @param deleteDocumentOptions the {@link DeleteDocumentOptions} containing the options for the |
846 | 846 | * call |
@@ -880,12 +880,11 @@ public ServiceCall<DeleteDocumentResponse> deleteDocument( |
880 | 880 | * |
881 | 881 | * <p>Search your data by submitting queries that are written in natural language or formatted in |
882 | 882 | * the Discovery Query Language. For more information, see the [Discovery |
883 | | - * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-query-concepts). |
884 | | - * The default query parameters differ by project type. For more information about the project |
885 | | - * default settings, see the [Discovery |
886 | | - * documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-query-defaults). |
887 | | - * See [the Projects API documentation](#create-project) for details about how to set custom |
888 | | - * default query settings. |
| 883 | + * documentation](/docs/discovery-data?topic=discovery-data-query-concepts). The default query |
| 884 | + * parameters differ by project type. For more information about the project default settings, see |
| 885 | + * the [Discovery documentation](/docs/discovery-data?topic=discovery-data-query-defaults). See |
| 886 | + * [the Projects API documentation](#create-project) for details about how to set custom default |
| 887 | + * query settings. |
889 | 888 | * |
890 | 889 | * <p>The length of the UTF-8 encoding of the POST body cannot exceed 10,000 bytes, which is |
891 | 890 | * roughly equivalent to 10,000 characters in English. |
@@ -1163,10 +1162,8 @@ public ServiceCall<StopWordList> getStopwordList(GetStopwordListOptions getStopw |
1163 | 1162 | * indexing time and at query time. A custom stop words list that you add is used at query time |
1164 | 1163 | * only. |
1165 | 1164 | * |
1166 | | - * <p>The custom stop words list replaces the default stop words list. Therefore, if you want to |
1167 | | - * keep the stop words that were used when the collection was indexed, get the default stop words |
1168 | | - * list for the language of the collection first and edit it to create your custom list. For |
1169 | | - * information about the default stop words lists per language, see [the product |
| 1165 | + * <p>The custom stop words list augments the default stop words list; you cannot remove stop |
| 1166 | + * words. For information about the default stop words lists per language, see [the product |
1170 | 1167 | * documentation](/docs/discovery-data?topic=discovery-data-stopwords). |
1171 | 1168 | * |
1172 | 1169 | * @param createStopwordListOptions the {@link CreateStopwordListOptions} containing the options |
@@ -2260,7 +2257,7 @@ public ServiceCall<AnalyzedDocument> analyzeDocument( |
2260 | 2257 | * <p>You associate a customer ID with data by passing the **X-Watson-Metadata** header with a |
2261 | 2258 | * request that passes data. For more information about personal data and customer IDs, see |
2262 | 2259 | * [Information |
2263 | | - * security](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-information-security#information-security). |
| 2260 | + * security](/docs/discovery-data?topic=discovery-data-information-security#information-security). |
2264 | 2261 | * |
2265 | 2262 | * <p>**Note:** This method is only supported on IBM Cloud instances of Discovery. |
2266 | 2263 | * |
|
0 commit comments