Watson Developer Cloud .NET Standard SDK  5.0.0
The .NET SDK uses the Watson Developer Cloud services, a collection of REST APIs and SDKs that use cognitive computing to solve complex problems.
IBM.Watson.Discovery.v2.DiscoveryService Class Reference
Inheritance diagram for IBM.Watson.Discovery.v2.DiscoveryService:
IBM.Watson.Discovery.v2.IDiscoveryService

Classes

class  AddDocumentEnums
 Enum values for AddDocument. More...
 
class  AnalyzeDocumentEnums
 Enum values for AnalyzeDocument. More...
 
class  UpdateDocumentEnums
 Enum values for UpdateDocument. More...
 

Public Member Functions

 DiscoveryService (string version)
 
 DiscoveryService (string version, IAuthenticator authenticator)
 
 DiscoveryService (string version, string serviceName)
 
 DiscoveryService (IClient httpClient)
 
 DiscoveryService (string version, string serviceName, IAuthenticator authenticator)
 
DetailedResponse< ListCollectionsResponseListCollections (string projectId)
 List collections. More...
 
DetailedResponse< CollectionDetailsCreateCollection (string projectId, string name, string description=null, string language=null, List< CollectionEnrichment > enrichments=null)
 Create a collection. More...
 
DetailedResponse< CollectionDetailsGetCollection (string projectId, string collectionId)
 Get collection. More...
 
DetailedResponse< CollectionDetailsUpdateCollection (string projectId, string collectionId, string name=null, string description=null, List< CollectionEnrichment > enrichments=null)
 Update a collection. More...
 
DetailedResponse< object > DeleteCollection (string projectId, string collectionId)
 Delete a collection. More...
 
DetailedResponse< QueryResponseQuery (string projectId, List< string > collectionIds=null, string filter=null, string query=null, string naturalLanguageQuery=null, string aggregation=null, long? count=null, List< string > _return=null, long? offset=null, string sort=null, bool? highlight=null, bool? spellingSuggestions=null, QueryLargeTableResults tableResults=null, QueryLargeSuggestedRefinements suggestedRefinements=null, QueryLargePassages passages=null)
 Query a project. More...
 
DetailedResponse< CompletionsGetAutocompletion (string projectId, string prefix, List< string > collectionIds=null, string field=null, long? count=null)
 Get Autocomplete Suggestions. More...
 
DetailedResponse< QueryNoticesResponseQueryNotices (string projectId, string filter=null, string query=null, string naturalLanguageQuery=null, long? count=null, long? offset=null)
 Query system notices. More...
 
DetailedResponse< ListFieldsResponseListFields (string projectId, List< string > collectionIds=null)
 List fields. More...
 
DetailedResponse< ComponentSettingsResponseGetComponentSettings (string projectId)
 List component settings. More...
 
DetailedResponse< DocumentAcceptedAddDocument (string projectId, string collectionId, System.IO.MemoryStream file=null, string filename=null, string fileContentType=null, string metadata=null, bool? xWatsonDiscoveryForce=null)
 Add a document. More...
 
DetailedResponse< DocumentAcceptedUpdateDocument (string projectId, string collectionId, string documentId, System.IO.MemoryStream file=null, string filename=null, string fileContentType=null, string metadata=null, bool? xWatsonDiscoveryForce=null)
 Update a document. More...
 
DetailedResponse< DeleteDocumentResponseDeleteDocument (string projectId, string collectionId, string documentId, bool? xWatsonDiscoveryForce=null)
 Delete a document. More...
 
DetailedResponse< TrainingQuerySetListTrainingQueries (string projectId)
 List training queries. More...
 
DetailedResponse< object > DeleteTrainingQueries (string projectId)
 Delete training queries. More...
 
DetailedResponse< TrainingQueryCreateTrainingQuery (string projectId, string naturalLanguageQuery, List< TrainingExample > examples, string filter=null)
 Create training query. More...
 
DetailedResponse< TrainingQueryGetTrainingQuery (string projectId, string queryId)
 Get a training data query. More...
 
DetailedResponse< TrainingQueryUpdateTrainingQuery (string projectId, string queryId, string naturalLanguageQuery, List< TrainingExample > examples, string filter=null)
 Update a training query. More...
 
DetailedResponse< AnalyzedDocumentAnalyzeDocument (string projectId, string collectionId, System.IO.MemoryStream file=null, string filename=null, string fileContentType=null, string metadata=null)
 Analyze a Document. More...
 
DetailedResponse< EnrichmentsListEnrichments (string projectId)
 List Enrichments. More...
 
DetailedResponse< EnrichmentCreateEnrichment (string projectId, CreateEnrichment enrichment, System.IO.MemoryStream file=null)
 Create an enrichment. More...
 
DetailedResponse< EnrichmentGetEnrichment (string projectId, string enrichmentId)
 Get enrichment. More...
 
DetailedResponse< EnrichmentUpdateEnrichment (string projectId, string enrichmentId, string name, string description=null)
 Update an enrichment. More...
 
DetailedResponse< object > DeleteEnrichment (string projectId, string enrichmentId)
 Delete an enrichment. More...
 
DetailedResponse< ListProjectsResponseListProjects ()
 List projects. More...
 
DetailedResponse< ProjectDetailsCreateProject (string name, string type, DefaultQueryParams defaultQueryParameters=null)
 Create a Project. More...
 
DetailedResponse< ProjectDetailsGetProject (string projectId)
 Get project. More...
 
DetailedResponse< ProjectDetailsUpdateProject (string projectId, string name=null)
 Update a project. More...
 
DetailedResponse< object > DeleteProject (string projectId)
 Delete a project. More...
 
DetailedResponse< object > DeleteUserData (string customerId)
 Delete labeled data. More...
 

Properties

string Version [get, set]
 

Constructor & Destructor Documentation

◆ DiscoveryService() [1/5]

IBM.Watson.Discovery.v2.DiscoveryService.DiscoveryService ( string  version)
inline

◆ DiscoveryService() [2/5]

IBM.Watson.Discovery.v2.DiscoveryService.DiscoveryService ( string  version,
IAuthenticator  authenticator 
)
inline

◆ DiscoveryService() [3/5]

IBM.Watson.Discovery.v2.DiscoveryService.DiscoveryService ( string  version,
string  serviceName 
)
inline

◆ DiscoveryService() [4/5]

IBM.Watson.Discovery.v2.DiscoveryService.DiscoveryService ( IClient  httpClient)
inline

◆ DiscoveryService() [5/5]

IBM.Watson.Discovery.v2.DiscoveryService.DiscoveryService ( string  version,
string  serviceName,
IAuthenticator  authenticator 
)
inline

Member Function Documentation

◆ AddDocument()

DetailedResponse<DocumentAccepted> IBM.Watson.Discovery.v2.DiscoveryService.AddDocument ( string  projectId,
string  collectionId,
System.IO.MemoryStream  file = null,
string  filename = null,
string  fileContentType = null,
string  metadata = null,
bool?  xWatsonDiscoveryForce = null 
)
inline

Add a document.

Add a document to a collection with optional metadata.

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 ,

If the document is uploaded to a collection that has it's data shared with another collection, the X-Watson-Discovery-Force header must be set to true.

Note: Documents can be added with a specific document_id by using the **_/v2/projects/{project_id}/collections/{collection_id}/documents** method.

Note: This operation only works on collections created to accept direct file uploads. It cannot be used to modify a collection that connects to an external source such as Microsoft SharePoint.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
collectionIdThe ID of the collection.
fileThe content of the document to ingest. The maximum supported file size when adding a file to a collection is 50 megabytes, the maximum supported file size when testing a configuration is 1 megabyte. Files larger than the supported size are rejected. (optional)
filenameThe filename for file. (optional)
fileContentTypeThe content type of file. (optional)
metadataThe maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected.

Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ``. (optional)</param> <param name="xWatsonDiscoveryForce">Whentrue`, the uploaded document is added to the collection even if the data for that collection is shared with other collections. (optional, default to false)

Returns
DocumentAcceptedDocumentAccepted

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ AnalyzeDocument()

DetailedResponse<AnalyzedDocument> IBM.Watson.Discovery.v2.DiscoveryService.AnalyzeDocument ( string  projectId,
string  collectionId,
System.IO.MemoryStream  file = null,
string  filename = null,
string  fileContentType = null,
string  metadata = null 
)
inline

Analyze a Document.

Process a document using the specified collection's settings and return it for realtime use.

Note: Documents processed using this method are not added to the specified collection.

Note: This method is only supported on IBM Cloud Pak for Data instances of Discovery.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
collectionIdThe ID of the collection.
fileThe content of the document to ingest. The maximum supported file size when adding a file to a collection is 50 megabytes, the maximum supported file size when testing a configuration is 1 megabyte. Files larger than the supported size are rejected. (optional)
filenameThe filename for file. (optional)
fileContentTypeThe content type of file. (optional)
metadataThe maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected.

Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ```. (optional)

Returns
AnalyzedDocumentAnalyzedDocument

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ CreateCollection()

DetailedResponse<CollectionDetails> IBM.Watson.Discovery.v2.DiscoveryService.CreateCollection ( string  projectId,
string  name,
string  description = null,
string  language = null,
List< CollectionEnrichment enrichments = null 
)
inline

Create a collection.

Create a new collection in the specified project.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
nameThe name of the collection.
descriptionA description of the collection. (optional)
languageThe language of the collection. (optional, default to en)
enrichmentsAn array of enrichments that are applied to this collection. (optional)
Returns
CollectionDetailsCollectionDetails

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ CreateEnrichment()

DetailedResponse<Enrichment> IBM.Watson.Discovery.v2.DiscoveryService.CreateEnrichment ( string  projectId,
CreateEnrichment  enrichment,
System.IO.MemoryStream  file = null 
)
inline

Create an enrichment.

Create an enrichment for use with the specified project/.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
enrichment
fileThe enrichment file to upload. (optional)
Returns
EnrichmentEnrichment

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ CreateProject()

DetailedResponse<ProjectDetails> IBM.Watson.Discovery.v2.DiscoveryService.CreateProject ( string  name,
string  type,
DefaultQueryParams  defaultQueryParameters = null 
)
inline

Create a Project.

Create a new project for this instance.

Parameters
nameThe human readable name of this project.
typeThe project type of this project.
defaultQueryParametersDefault query parameters for this project. (optional)
Returns
ProjectDetailsProjectDetails

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ CreateTrainingQuery()

DetailedResponse<TrainingQuery> IBM.Watson.Discovery.v2.DiscoveryService.CreateTrainingQuery ( string  projectId,
string  naturalLanguageQuery,
List< TrainingExample examples,
string  filter = null 
)
inline

Create training query.

Add a query to the training data for this project. The query can contain a filter and natural language query.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
naturalLanguageQueryThe natural text query for the training query.
examplesArray of training examples.
filterThe filter used on the collection before the natural_language_query is applied. (optional)
Returns
TrainingQueryTrainingQuery

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ DeleteCollection()

DetailedResponse<object> IBM.Watson.Discovery.v2.DiscoveryService.DeleteCollection ( string  projectId,
string  collectionId 
)
inline

Delete a collection.

Deletes the specified collection from the project. All documents stored in the specified collection and not shared is also deleted.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
collectionIdThe ID of the collection.
Returns
objectobject

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ DeleteDocument()

DetailedResponse<DeleteDocumentResponse> IBM.Watson.Discovery.v2.DiscoveryService.DeleteDocument ( string  projectId,
string  collectionId,
string  documentId,
bool?  xWatsonDiscoveryForce = null 
)
inline

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'.

Note: This operation only works on collections created to accept direct file uploads. It cannot be used to modify a collection that connects to an external source such as Microsoft SharePoint.

Note: Segments of an uploaded document cannot be deleted individually. Delete all segments by deleting using the parent_document_id of a segment result.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
collectionIdThe ID of the collection.
documentIdThe ID of the document.
xWatsonDiscoveryForceWhen true, the uploaded document is added to the collection even if the data for that collection is shared with other collections. (optional, default to false)
Returns
DeleteDocumentResponseDeleteDocumentResponse

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ DeleteEnrichment()

DetailedResponse<object> IBM.Watson.Discovery.v2.DiscoveryService.DeleteEnrichment ( string  projectId,
string  enrichmentId 
)
inline

Delete an enrichment.

Deletes an existing enrichment from the specified project.

Note: Only enrichments that have been manually created can be deleted.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
enrichmentIdThe ID of the enrichment.
Returns
objectobject

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ DeleteProject()

DetailedResponse<object> IBM.Watson.Discovery.v2.DiscoveryService.DeleteProject ( string  projectId)
inline

Delete a project.

Deletes the specified project.

Important: Deleting a project deletes everything that is part of the specified project, including all collections.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
Returns
objectobject

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ DeleteTrainingQueries()

DetailedResponse<object> IBM.Watson.Discovery.v2.DiscoveryService.DeleteTrainingQueries ( string  projectId)
inline

Delete training queries.

Removes all training queries for the specified project.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
Returns
objectobject

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ DeleteUserData()

DetailedResponse<object> IBM.Watson.Discovery.v2.DiscoveryService.DeleteUserData ( string  customerId)
inline

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.

Note: This method is only supported on IBM Cloud instances of Discovery.

Parameters
customerIdThe customer ID for which all data is to be deleted.
Returns
objectobject

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ GetAutocompletion()

DetailedResponse<Completions> IBM.Watson.Discovery.v2.DiscoveryService.GetAutocompletion ( string  projectId,
string  prefix,
List< string >  collectionIds = null,
string  field = null,
long?  count = null 
)
inline

Get Autocomplete Suggestions.

Returns completion query suggestions for the specified prefix.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
prefixThe prefix to use for autocompletion. For example, the prefix Ho could autocomplete to Hot, Housing, or How do I upgrade. Possible completions are.
collectionIdsComma separated list of the collection IDs. If this parameter is not specified, all collections in the project are used. (optional)
fieldThe field in the result documents that autocompletion suggestions are identified from. (optional)
countThe number of autocompletion suggestions to return. (optional)
Returns
CompletionsCompletions

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ GetCollection()

DetailedResponse<CollectionDetails> IBM.Watson.Discovery.v2.DiscoveryService.GetCollection ( string  projectId,
string  collectionId 
)
inline

Get collection.

Get details about the specified collection.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
collectionIdThe ID of the collection.
Returns
CollectionDetailsCollectionDetails

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ GetComponentSettings()

DetailedResponse<ComponentSettingsResponse> IBM.Watson.Discovery.v2.DiscoveryService.GetComponentSettings ( string  projectId)
inline

List component settings.

Returns default configuration settings for components.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
Returns
ComponentSettingsResponseComponentSettingsResponse

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ GetEnrichment()

DetailedResponse<Enrichment> IBM.Watson.Discovery.v2.DiscoveryService.GetEnrichment ( string  projectId,
string  enrichmentId 
)
inline

Get enrichment.

Get details about a specific enrichment.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
enrichmentIdThe ID of the enrichment.
Returns
EnrichmentEnrichment

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ GetProject()

DetailedResponse<ProjectDetails> IBM.Watson.Discovery.v2.DiscoveryService.GetProject ( string  projectId)
inline

Get project.

Get details on the specified project.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
Returns
ProjectDetailsProjectDetails

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ GetTrainingQuery()

DetailedResponse<TrainingQuery> IBM.Watson.Discovery.v2.DiscoveryService.GetTrainingQuery ( string  projectId,
string  queryId 
)
inline

Get a training data query.

Get details for a specific training data query, including the query string and all examples.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
queryIdThe ID of the query used for training.
Returns
TrainingQueryTrainingQuery

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ ListCollections()

DetailedResponse<ListCollectionsResponse> IBM.Watson.Discovery.v2.DiscoveryService.ListCollections ( string  projectId)
inline

List collections.

Lists existing collections for the specified project.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
Returns
ListCollectionsResponseListCollectionsResponse

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ ListEnrichments()

DetailedResponse<Enrichments> IBM.Watson.Discovery.v2.DiscoveryService.ListEnrichments ( string  projectId)
inline

List Enrichments.

List the enrichments available to this project.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
Returns
EnrichmentsEnrichments

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ ListFields()

DetailedResponse<ListFieldsResponse> IBM.Watson.Discovery.v2.DiscoveryService.ListFields ( string  projectId,
List< string >  collectionIds = null 
)
inline

List fields.

Gets a list of the unique fields (and their types) stored in the the specified collections.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
collectionIdsComma separated list of the collection IDs. If this parameter is not specified, all collections in the project are used. (optional)
Returns
ListFieldsResponseListFieldsResponse

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ ListProjects()

DetailedResponse<ListProjectsResponse> IBM.Watson.Discovery.v2.DiscoveryService.ListProjects ( )
inline

List projects.

Lists existing projects for this instance.

Returns
ListProjectsResponseListProjectsResponse

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ ListTrainingQueries()

DetailedResponse<TrainingQuerySet> IBM.Watson.Discovery.v2.DiscoveryService.ListTrainingQueries ( string  projectId)
inline

List training queries.

List the training queries for the specified project.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
Returns
TrainingQuerySetTrainingQuerySet

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ Query()

DetailedResponse<QueryResponse> IBM.Watson.Discovery.v2.DiscoveryService.Query ( string  projectId,
List< string >  collectionIds = null,
string  filter = null,
string  query = null,
string  naturalLanguageQuery = null,
string  aggregation = null,
long?  count = null,
List< string >  _return = null,
long?  offset = null,
string  sort = null,
bool?  highlight = null,
bool?  spellingSuggestions = null,
QueryLargeTableResults  tableResults = null,
QueryLargeSuggestedRefinements  suggestedRefinements = null,
QueryLargePassages  passages = null 
)
inline

Query a project.

By using this method, you can construct queries. For details, see the Discovery documentation. The default query parameters are defined by the settings for this project, see the Discovery documentation for an overview of the standard default settings, and see the Projects API documentation for details about how to set custom default query settings.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
collectionIdsA comma-separated list of collection IDs to be queried against. (optional)
filterA cacheable query that excludes documents that don't mention the query content. Filter searches are better for metadata-type searches and for assessing the concepts in the data set. (optional)
queryA query search returns all documents in your data set with full enrichments and full text, but with the most relevant documents listed first. Use a query search when you want to find the most relevant search results. (optional)
naturalLanguageQueryA natural language query that returns relevant documents by utilizing training data and natural language understanding. (optional)
aggregationAn aggregation search that returns an exact answer by combining query search with filters. Useful for applications to build lists, tables, and time series. For a full list of possible aggregations, see the Query reference. (optional)
countNumber of results to return. (optional)
_returnA list of the fields in the document hierarchy to return. If this parameter not specified, then all top-level fields are returned. (optional)
offsetThe number of query results to skip at the beginning. For example, if the total number of results that are returned is 10 and the offset is 8, it returns the last two results. (optional)
sortA comma-separated list of fields in the document to sort on. You can optionally specify a sort direction by prefixing the field with - for descending or + for ascending. Ascending is the default sort direction if no prefix is specified. This parameter cannot be used in the same query as the bias parameter. (optional)
highlightWhen true, a highlight field is returned for each result which contains the fields which match the query with <em></em> tags around the matching query terms. (optional)
spellingSuggestionsWhen true and the natural_language_query parameter is used, the natural_language_query parameter is spell checked. The most likely correction is returned in the suggested_query field of the response (if one exists). (optional)
tableResultsConfiguration for table retrieval. (optional)
suggestedRefinementsConfiguration for suggested refinements. (optional)
passagesConfiguration for passage retrieval. (optional)
Returns
QueryResponseQueryResponse

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ QueryNotices()

DetailedResponse<QueryNoticesResponse> IBM.Watson.Discovery.v2.DiscoveryService.QueryNotices ( string  projectId,
string  filter = null,
string  query = null,
string  naturalLanguageQuery = null,
long?  count = null,
long?  offset = null 
)
inline

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.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
filterA cacheable query that excludes documents that don't mention the query content. Filter searches are better for metadata-type searches and for assessing the concepts in the data set. (optional)
queryA query search returns all documents in your data set with full enrichments and full text, but with the most relevant documents listed first. (optional)
naturalLanguageQueryA natural language query that returns relevant documents by utilizing training data and natural language understanding. (optional)
countNumber of results to return. The maximum for the count and offset values together in any one query is 10000. (optional)
offsetThe number of query results to skip at the beginning. For example, if the total number of results that are returned is 10 and the offset is 8, it returns the last two results. The maximum for the count and offset values together in any one query is 10000. (optional)
Returns
QueryNoticesResponseQueryNoticesResponse

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ UpdateCollection()

DetailedResponse<CollectionDetails> IBM.Watson.Discovery.v2.DiscoveryService.UpdateCollection ( string  projectId,
string  collectionId,
string  name = null,
string  description = null,
List< CollectionEnrichment enrichments = null 
)
inline

Update a collection.

Updates the specified collection's name, description, and enrichments.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
collectionIdThe ID of the collection.
nameThe name of the collection. (optional)
descriptionA description of the collection. (optional)
enrichmentsAn array of enrichments that are applied to this collection. (optional)
Returns
CollectionDetailsCollectionDetails

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ UpdateDocument()

DetailedResponse<DocumentAccepted> IBM.Watson.Discovery.v2.DiscoveryService.UpdateDocument ( string  projectId,
string  collectionId,
string  documentId,
System.IO.MemoryStream  file = null,
string  filename = null,
string  fileContentType = null,
string  metadata = null,
bool?  xWatsonDiscoveryForce = null 
)
inline

Update a document.

Replace an existing document or add a document with a specified document_id. Starts ingesting a document with optional metadata.

If the document is uploaded to a collection that has it's data shared with another collection, the X-Watson-Discovery-Force header must be set to true.

Note: When uploading a new document with this method it automatically replaces any document stored with the same document_id if it exists.

Note: This operation only works on collections created to accept direct file uploads. It cannot be used to modify a collection that connects to an external source such as Microsoft SharePoint.

Note: If an uploaded document is segmented, all segments will be overwritten, even if the updated version of the document has fewer segments.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
collectionIdThe ID of the collection.
documentIdThe ID of the document.
fileThe content of the document to ingest. The maximum supported file size when adding a file to a collection is 50 megabytes, the maximum supported file size when testing a configuration is 1 megabyte. Files larger than the supported size are rejected. (optional)
filenameThe filename for file. (optional)
fileContentTypeThe content type of file. (optional)
metadataThe maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected.

Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ``. (optional)</param> <param name="xWatsonDiscoveryForce">Whentrue`, the uploaded document is added to the collection even if the data for that collection is shared with other collections. (optional, default to false)

Returns
DocumentAcceptedDocumentAccepted

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ UpdateEnrichment()

DetailedResponse<Enrichment> IBM.Watson.Discovery.v2.DiscoveryService.UpdateEnrichment ( string  projectId,
string  enrichmentId,
string  name,
string  description = null 
)
inline

Update an enrichment.

Updates an existing enrichment's name and description.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
enrichmentIdThe ID of the enrichment.
nameA new name for the enrichment.
descriptionA new description for the enrichment. (optional)
Returns
EnrichmentEnrichment

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ UpdateProject()

DetailedResponse<ProjectDetails> IBM.Watson.Discovery.v2.DiscoveryService.UpdateProject ( string  projectId,
string  name = null 
)
inline

Update a project.

Update the specified project's name.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
nameThe new name to give this project. (optional)
Returns
ProjectDetailsProjectDetails

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

◆ UpdateTrainingQuery()

DetailedResponse<TrainingQuery> IBM.Watson.Discovery.v2.DiscoveryService.UpdateTrainingQuery ( string  projectId,
string  queryId,
string  naturalLanguageQuery,
List< TrainingExample examples,
string  filter = null 
)
inline

Update a training query.

Updates an existing training query and it's examples.

Parameters
projectIdThe ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
queryIdThe ID of the query used for training.
naturalLanguageQueryThe natural text query for the training query.
examplesArray of training examples.
filterThe filter used on the collection before the natural_language_query is applied. (optional)
Returns
TrainingQueryTrainingQuery

Implements IBM.Watson.Discovery.v2.IDiscoveryService.

Property Documentation

◆ Version

string IBM.Watson.Discovery.v2.DiscoveryService.Version
getset

The documentation for this class was generated from the following file: