Documentation
¶
Overview ¶
Package discoveryv2 : Operations and models for the DiscoveryV2 service
Index ¶
- Constants
- type AddDocumentOptions
- func (options *AddDocumentOptions) SetCollectionID(collectionID string) *AddDocumentOptions
- func (options *AddDocumentOptions) SetFile(file io.ReadCloser) *AddDocumentOptions
- func (options *AddDocumentOptions) SetFileContentType(fileContentType string) *AddDocumentOptions
- func (options *AddDocumentOptions) SetFilename(filename string) *AddDocumentOptions
- func (options *AddDocumentOptions) SetHeaders(param map[string]string) *AddDocumentOptions
- func (options *AddDocumentOptions) SetMetadata(metadata string) *AddDocumentOptions
- func (options *AddDocumentOptions) SetProjectID(projectID string) *AddDocumentOptions
- func (options *AddDocumentOptions) SetXWatsonDiscoveryForce(xWatsonDiscoveryForce bool) *AddDocumentOptions
- type Collection
- type CollectionDetails
- type CollectionEnrichment
- type Completions
- type ComponentSettingsAggregation
- type ComponentSettingsFieldsShown
- type ComponentSettingsFieldsShownBody
- type ComponentSettingsFieldsShownTitle
- type ComponentSettingsResponse
- type CreateCollectionOptions
- func (options *CreateCollectionOptions) SetDescription(description string) *CreateCollectionOptions
- func (options *CreateCollectionOptions) SetEnrichments(enrichments []CollectionEnrichment) *CreateCollectionOptions
- func (options *CreateCollectionOptions) SetHeaders(param map[string]string) *CreateCollectionOptions
- func (options *CreateCollectionOptions) SetLanguage(language string) *CreateCollectionOptions
- func (options *CreateCollectionOptions) SetName(name string) *CreateCollectionOptions
- func (options *CreateCollectionOptions) SetProjectID(projectID string) *CreateCollectionOptions
- type CreateEnrichment
- type CreateEnrichmentOptions
- func (options *CreateEnrichmentOptions) SetEnrichment(enrichment *CreateEnrichment) *CreateEnrichmentOptions
- func (options *CreateEnrichmentOptions) SetFile(file io.ReadCloser) *CreateEnrichmentOptions
- func (options *CreateEnrichmentOptions) SetHeaders(param map[string]string) *CreateEnrichmentOptions
- func (options *CreateEnrichmentOptions) SetProjectID(projectID string) *CreateEnrichmentOptions
- type CreateProjectOptions
- func (options *CreateProjectOptions) SetDefaultQueryParameters(defaultQueryParameters *DefaultQueryParams) *CreateProjectOptions
- func (options *CreateProjectOptions) SetHeaders(param map[string]string) *CreateProjectOptions
- func (options *CreateProjectOptions) SetName(name string) *CreateProjectOptions
- func (options *CreateProjectOptions) SetType(typeVar string) *CreateProjectOptions
- type CreateTrainingQueryOptions
- func (options *CreateTrainingQueryOptions) SetExamples(examples []TrainingExample) *CreateTrainingQueryOptions
- func (options *CreateTrainingQueryOptions) SetFilter(filter string) *CreateTrainingQueryOptions
- func (options *CreateTrainingQueryOptions) SetHeaders(param map[string]string) *CreateTrainingQueryOptions
- func (options *CreateTrainingQueryOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *CreateTrainingQueryOptions
- func (options *CreateTrainingQueryOptions) SetProjectID(projectID string) *CreateTrainingQueryOptions
- type DefaultQueryParams
- type DefaultQueryParamsPassages
- type DefaultQueryParamsSuggestedRefinements
- type DefaultQueryParamsTableResults
- type DeleteCollectionOptions
- type DeleteDocumentOptions
- func (options *DeleteDocumentOptions) SetCollectionID(collectionID string) *DeleteDocumentOptions
- func (options *DeleteDocumentOptions) SetDocumentID(documentID string) *DeleteDocumentOptions
- func (options *DeleteDocumentOptions) SetHeaders(param map[string]string) *DeleteDocumentOptions
- func (options *DeleteDocumentOptions) SetProjectID(projectID string) *DeleteDocumentOptions
- func (options *DeleteDocumentOptions) SetXWatsonDiscoveryForce(xWatsonDiscoveryForce bool) *DeleteDocumentOptions
- type DeleteDocumentResponse
- type DeleteEnrichmentOptions
- type DeleteProjectOptions
- type DeleteTrainingQueriesOptions
- type DeleteUserDataOptions
- type DiscoveryV2
- func (discovery *DiscoveryV2) AddDocument(addDocumentOptions *AddDocumentOptions) (result *DocumentAccepted, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) CreateCollection(createCollectionOptions *CreateCollectionOptions) (result *CollectionDetails, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) CreateEnrichment(createEnrichmentOptions *CreateEnrichmentOptions) (result *Enrichment, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) CreateProject(createProjectOptions *CreateProjectOptions) (result *ProjectDetails, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) CreateTrainingQuery(createTrainingQueryOptions *CreateTrainingQueryOptions) (result *TrainingQuery, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) DeleteCollection(deleteCollectionOptions *DeleteCollectionOptions) (response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) DeleteDocument(deleteDocumentOptions *DeleteDocumentOptions) (result *DeleteDocumentResponse, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) DeleteEnrichment(deleteEnrichmentOptions *DeleteEnrichmentOptions) (response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) DeleteProject(deleteProjectOptions *DeleteProjectOptions) (response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) DeleteTrainingQueries(deleteTrainingQueriesOptions *DeleteTrainingQueriesOptions) (response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) DeleteUserData(deleteUserDataOptions *DeleteUserDataOptions) (response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) DisableSSLVerification()
- func (discovery *DiscoveryV2) GetAutocompletion(getAutocompletionOptions *GetAutocompletionOptions) (result *Completions, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) GetCollection(getCollectionOptions *GetCollectionOptions) (result *CollectionDetails, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) GetComponentSettings(getComponentSettingsOptions *GetComponentSettingsOptions) (result *ComponentSettingsResponse, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) GetEnrichment(getEnrichmentOptions *GetEnrichmentOptions) (result *Enrichment, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) GetProject(getProjectOptions *GetProjectOptions) (result *ProjectDetails, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) GetTrainingQuery(getTrainingQueryOptions *GetTrainingQueryOptions) (result *TrainingQuery, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) ListCollections(listCollectionsOptions *ListCollectionsOptions) (result *ListCollectionsResponse, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) ListEnrichments(listEnrichmentsOptions *ListEnrichmentsOptions) (result *Enrichments, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) ListFields(listFieldsOptions *ListFieldsOptions) (result *ListFieldsResponse, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) ListProjects(listProjectsOptions *ListProjectsOptions) (result *ListProjectsResponse, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) ListTrainingQueries(listTrainingQueriesOptions *ListTrainingQueriesOptions) (result *TrainingQuerySet, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) NewAddDocumentOptions(projectID string, collectionID string) *AddDocumentOptions
- func (discovery *DiscoveryV2) NewCollectionDetails(name string) (model *CollectionDetails, err error)
- func (discovery *DiscoveryV2) NewCreateCollectionOptions(projectID string, name string) *CreateCollectionOptions
- func (discovery *DiscoveryV2) NewCreateEnrichmentOptions(projectID string, enrichment *CreateEnrichment) *CreateEnrichmentOptions
- func (discovery *DiscoveryV2) NewCreateProjectOptions(name string, typeVar string) *CreateProjectOptions
- func (discovery *DiscoveryV2) NewCreateTrainingQueryOptions(projectID string, naturalLanguageQuery string, examples []TrainingExample) *CreateTrainingQueryOptions
- func (discovery *DiscoveryV2) NewDeleteCollectionOptions(projectID string, collectionID string) *DeleteCollectionOptions
- func (discovery *DiscoveryV2) NewDeleteDocumentOptions(projectID string, collectionID string, documentID string) *DeleteDocumentOptions
- func (discovery *DiscoveryV2) NewDeleteEnrichmentOptions(projectID string, enrichmentID string) *DeleteEnrichmentOptions
- func (discovery *DiscoveryV2) NewDeleteProjectOptions(projectID string) *DeleteProjectOptions
- func (discovery *DiscoveryV2) NewDeleteTrainingQueriesOptions(projectID string) *DeleteTrainingQueriesOptions
- func (discovery *DiscoveryV2) NewDeleteUserDataOptions(customerID string) *DeleteUserDataOptions
- func (discovery *DiscoveryV2) NewGetAutocompletionOptions(projectID string, prefix string) *GetAutocompletionOptions
- func (discovery *DiscoveryV2) NewGetCollectionOptions(projectID string, collectionID string) *GetCollectionOptions
- func (discovery *DiscoveryV2) NewGetComponentSettingsOptions(projectID string) *GetComponentSettingsOptions
- func (discovery *DiscoveryV2) NewGetEnrichmentOptions(projectID string, enrichmentID string) *GetEnrichmentOptions
- func (discovery *DiscoveryV2) NewGetProjectOptions(projectID string) *GetProjectOptions
- func (discovery *DiscoveryV2) NewGetTrainingQueryOptions(projectID string, queryID string) *GetTrainingQueryOptions
- func (discovery *DiscoveryV2) NewListCollectionsOptions(projectID string) *ListCollectionsOptions
- func (discovery *DiscoveryV2) NewListEnrichmentsOptions(projectID string) *ListEnrichmentsOptions
- func (discovery *DiscoveryV2) NewListFieldsOptions(projectID string) *ListFieldsOptions
- func (discovery *DiscoveryV2) NewListProjectsOptions() *ListProjectsOptions
- func (discovery *DiscoveryV2) NewListTrainingQueriesOptions(projectID string) *ListTrainingQueriesOptions
- func (discovery *DiscoveryV2) NewQueryNoticesOptions(projectID string) *QueryNoticesOptions
- func (discovery *DiscoveryV2) NewQueryOptions(projectID string) *QueryOptions
- func (discovery *DiscoveryV2) NewTrainingExample(documentID string, collectionID string, relevance int64) (model *TrainingExample, err error)
- func (discovery *DiscoveryV2) NewTrainingQuery(naturalLanguageQuery string, examples []TrainingExample) (model *TrainingQuery, err error)
- func (discovery *DiscoveryV2) NewUpdateCollectionOptions(projectID string, collectionID string) *UpdateCollectionOptions
- func (discovery *DiscoveryV2) NewUpdateDocumentOptions(projectID string, collectionID string, documentID string) *UpdateDocumentOptions
- func (discovery *DiscoveryV2) NewUpdateEnrichmentOptions(projectID string, enrichmentID string, name string) *UpdateEnrichmentOptions
- func (discovery *DiscoveryV2) NewUpdateProjectOptions(projectID string) *UpdateProjectOptions
- func (discovery *DiscoveryV2) NewUpdateTrainingQueryOptions(projectID string, queryID string, naturalLanguageQuery string, ...) *UpdateTrainingQueryOptions
- func (discovery *DiscoveryV2) Query(queryOptions *QueryOptions) (result *QueryResponse, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) QueryNotices(queryNoticesOptions *QueryNoticesOptions) (result *QueryNoticesResponse, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) SetServiceURL(url string) error
- func (discovery *DiscoveryV2) UpdateCollection(updateCollectionOptions *UpdateCollectionOptions) (result *CollectionDetails, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) UpdateDocument(updateDocumentOptions *UpdateDocumentOptions) (result *DocumentAccepted, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) UpdateEnrichment(updateEnrichmentOptions *UpdateEnrichmentOptions) (result *Enrichment, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) UpdateProject(updateProjectOptions *UpdateProjectOptions) (result *ProjectDetails, response *core.DetailedResponse, err error)
- func (discovery *DiscoveryV2) UpdateTrainingQuery(updateTrainingQueryOptions *UpdateTrainingQueryOptions) (result *TrainingQuery, response *core.DetailedResponse, err error)
- type DiscoveryV2Options
- type DocumentAccepted
- type DocumentAttribute
- type Enrichment
- type EnrichmentOptions
- type Enrichments
- type Field
- type GetAutocompletionOptions
- func (options *GetAutocompletionOptions) SetCollectionIds(collectionIds []string) *GetAutocompletionOptions
- func (options *GetAutocompletionOptions) SetCount(count int64) *GetAutocompletionOptions
- func (options *GetAutocompletionOptions) SetField(field string) *GetAutocompletionOptions
- func (options *GetAutocompletionOptions) SetHeaders(param map[string]string) *GetAutocompletionOptions
- func (options *GetAutocompletionOptions) SetPrefix(prefix string) *GetAutocompletionOptions
- func (options *GetAutocompletionOptions) SetProjectID(projectID string) *GetAutocompletionOptions
- type GetCollectionOptions
- type GetComponentSettingsOptions
- type GetEnrichmentOptions
- type GetProjectOptions
- type GetTrainingQueryOptions
- type ListCollectionsOptions
- type ListCollectionsResponse
- type ListEnrichmentsOptions
- type ListFieldsOptions
- type ListFieldsResponse
- type ListProjectsOptions
- type ListProjectsResponse
- type ListTrainingQueriesOptions
- type Notice
- type ProjectDetails
- type ProjectListDetails
- type ProjectListDetailsRelevancyTrainingStatus
- type QueryAggregation
- type QueryCalculationAggregation
- type QueryFilterAggregation
- type QueryGroupByAggregation
- type QueryGroupByAggregationResult
- type QueryHistogramAggregation
- type QueryHistogramAggregationResult
- type QueryLargePassages
- type QueryLargeSuggestedRefinements
- type QueryLargeTableResults
- type QueryNestedAggregation
- type QueryNoticesOptions
- func (options *QueryNoticesOptions) SetCount(count int64) *QueryNoticesOptions
- func (options *QueryNoticesOptions) SetFilter(filter string) *QueryNoticesOptions
- func (options *QueryNoticesOptions) SetHeaders(param map[string]string) *QueryNoticesOptions
- func (options *QueryNoticesOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *QueryNoticesOptions
- func (options *QueryNoticesOptions) SetOffset(offset int64) *QueryNoticesOptions
- func (options *QueryNoticesOptions) SetProjectID(projectID string) *QueryNoticesOptions
- func (options *QueryNoticesOptions) SetQuery(query string) *QueryNoticesOptions
- type QueryNoticesResponse
- type QueryOptions
- func (options *QueryOptions) SetAggregation(aggregation string) *QueryOptions
- func (options *QueryOptions) SetCollectionIds(collectionIds []string) *QueryOptions
- func (options *QueryOptions) SetCount(count int64) *QueryOptions
- func (options *QueryOptions) SetFilter(filter string) *QueryOptions
- func (options *QueryOptions) SetHeaders(param map[string]string) *QueryOptions
- func (options *QueryOptions) SetHighlight(highlight bool) *QueryOptions
- func (options *QueryOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *QueryOptions
- func (options *QueryOptions) SetOffset(offset int64) *QueryOptions
- func (options *QueryOptions) SetPassages(passages *QueryLargePassages) *QueryOptions
- func (options *QueryOptions) SetProjectID(projectID string) *QueryOptions
- func (options *QueryOptions) SetQuery(query string) *QueryOptions
- func (options *QueryOptions) SetReturn(returnVar []string) *QueryOptions
- func (options *QueryOptions) SetSort(sort string) *QueryOptions
- func (options *QueryOptions) SetSpellingSuggestions(spellingSuggestions bool) *QueryOptions
- func (options *QueryOptions) SetSuggestedRefinements(suggestedRefinements *QueryLargeSuggestedRefinements) *QueryOptions
- func (options *QueryOptions) SetTableResults(tableResults *QueryLargeTableResults) *QueryOptions
- type QueryResponse
- type QueryResult
- func (this *QueryResult) GetDocumentID() *string
- func (this *QueryResult) GetDocumentPassages() *[]QueryResultPassage
- func (this *QueryResult) GetMetadata() *map[string]interface{}
- func (this *QueryResult) GetProperty(Key string) *interface{}
- func (this *QueryResult) GetResultMetadata() *QueryResultMetadata
- func (this *QueryResult) SetDocumentID(DocumentID *string)
- func (this *QueryResult) SetDocumentPassages(DocumentPassages *[]QueryResultPassage)
- func (this *QueryResult) SetMetadata(Metadata *map[string]interface{})
- func (this *QueryResult) SetProperty(Key string, Value *interface{})
- func (this *QueryResult) SetResultMetadata(ResultMetadata *QueryResultMetadata)
- type QueryResultMetadata
- type QueryResultPassage
- type QuerySuggestedRefinement
- type QueryTableResult
- type QueryTermAggregation
- type QueryTermAggregationResult
- type QueryTimesliceAggregation
- type QueryTimesliceAggregationResult
- type QueryTopHitsAggregation
- type QueryTopHitsAggregationResult
- type RetrievalDetails
- type TableBodyCells
- type TableCellKey
- type TableCellValues
- type TableColumnHeaderIds
- type TableColumnHeaderTexts
- type TableColumnHeaderTextsNormalized
- type TableColumnHeaders
- type TableElementLocation
- type TableHeaders
- type TableKeyValuePairs
- type TableResultTable
- type TableRowHeaderIds
- type TableRowHeaderTexts
- type TableRowHeaderTextsNormalized
- type TableRowHeaders
- type TableTextLocation
- type TrainingExample
- type TrainingQuery
- type TrainingQuerySet
- type UpdateCollectionOptions
- func (options *UpdateCollectionOptions) SetCollectionID(collectionID string) *UpdateCollectionOptions
- func (options *UpdateCollectionOptions) SetDescription(description string) *UpdateCollectionOptions
- func (options *UpdateCollectionOptions) SetEnrichments(enrichments []CollectionEnrichment) *UpdateCollectionOptions
- func (options *UpdateCollectionOptions) SetHeaders(param map[string]string) *UpdateCollectionOptions
- func (options *UpdateCollectionOptions) SetName(name string) *UpdateCollectionOptions
- func (options *UpdateCollectionOptions) SetProjectID(projectID string) *UpdateCollectionOptions
- type UpdateDocumentOptions
- func (options *UpdateDocumentOptions) SetCollectionID(collectionID string) *UpdateDocumentOptions
- func (options *UpdateDocumentOptions) SetDocumentID(documentID string) *UpdateDocumentOptions
- func (options *UpdateDocumentOptions) SetFile(file io.ReadCloser) *UpdateDocumentOptions
- func (options *UpdateDocumentOptions) SetFileContentType(fileContentType string) *UpdateDocumentOptions
- func (options *UpdateDocumentOptions) SetFilename(filename string) *UpdateDocumentOptions
- func (options *UpdateDocumentOptions) SetHeaders(param map[string]string) *UpdateDocumentOptions
- func (options *UpdateDocumentOptions) SetMetadata(metadata string) *UpdateDocumentOptions
- func (options *UpdateDocumentOptions) SetProjectID(projectID string) *UpdateDocumentOptions
- func (options *UpdateDocumentOptions) SetXWatsonDiscoveryForce(xWatsonDiscoveryForce bool) *UpdateDocumentOptions
- type UpdateEnrichmentOptions
- func (options *UpdateEnrichmentOptions) SetDescription(description string) *UpdateEnrichmentOptions
- func (options *UpdateEnrichmentOptions) SetEnrichmentID(enrichmentID string) *UpdateEnrichmentOptions
- func (options *UpdateEnrichmentOptions) SetHeaders(param map[string]string) *UpdateEnrichmentOptions
- func (options *UpdateEnrichmentOptions) SetName(name string) *UpdateEnrichmentOptions
- func (options *UpdateEnrichmentOptions) SetProjectID(projectID string) *UpdateEnrichmentOptions
- type UpdateProjectOptions
- type UpdateTrainingQueryOptions
- func (options *UpdateTrainingQueryOptions) SetExamples(examples []TrainingExample) *UpdateTrainingQueryOptions
- func (options *UpdateTrainingQueryOptions) SetFilter(filter string) *UpdateTrainingQueryOptions
- func (options *UpdateTrainingQueryOptions) SetHeaders(param map[string]string) *UpdateTrainingQueryOptions
- func (options *UpdateTrainingQueryOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *UpdateTrainingQueryOptions
- func (options *UpdateTrainingQueryOptions) SetProjectID(projectID string) *UpdateTrainingQueryOptions
- func (options *UpdateTrainingQueryOptions) SetQueryID(queryID string) *UpdateTrainingQueryOptions
Constants ¶
const ( ComponentSettingsAggregation_VisualizationType_Auto = "auto" ComponentSettingsAggregation_VisualizationType_FacetTable = "facet_table" ComponentSettingsAggregation_VisualizationType_Map = "map" ComponentSettingsAggregation_VisualizationType_WordCloud = "word_cloud" )
Constants associated with the ComponentSettingsAggregation.VisualizationType property. Type of visualization to use when rendering the aggregation.
const ( CreateEnrichment_Type_Dictionary = "dictionary" CreateEnrichment_Type_RegularExpression = "regular_expression" CreateEnrichment_Type_RuleBased = "rule_based" CreateEnrichment_Type_UimaAnnotator = "uima_annotator" CreateEnrichment_Type_WatsonKnowledgeStudioModel = "watson_knowledge_studio_model" )
Constants associated with the CreateEnrichment.Type property. The type of this enrichment.
const ( CreateProjectOptions_Type_AnswerRetrieval = "answer_retrieval" CreateProjectOptions_Type_ContentMining = "content_mining" CreateProjectOptions_Type_DocumentRetrieval = "document_retrieval" CreateProjectOptions_Type_Other = "other" )
Constants associated with the CreateProjectOptions.Type property. The project type of this project.
const ( DocumentAccepted_Status_Pending = "pending" DocumentAccepted_Status_Processing = "processing" )
Constants associated with the DocumentAccepted.Status property. Status of the document in the ingestion process. A status of `processing` is returned for documents that are ingested with a *version* date before `2019-01-01`. The `pending` status is returned for all others.
const ( Enrichment_Type_Dictionary = "dictionary" Enrichment_Type_NaturalLanguageUnderstanding = "natural_language_understanding" Enrichment_Type_PartOfSpeech = "part_of_speech" Enrichment_Type_RegularExpression = "regular_expression" Enrichment_Type_RuleBased = "rule_based" Enrichment_Type_Sentiment = "sentiment" Enrichment_Type_UimaAnnotator = "uima_annotator" Enrichment_Type_WatsonKnowledgeStudioModel = "watson_knowledge_studio_model" )
Constants associated with the Enrichment.Type property. The type of this enrichment.
const ( Field_Type_Binary = "binary" Field_Type_Boolean = "boolean" Field_Type_Byte = "byte" Field_Type_Date = "date" Field_Type_Double = "double" Field_Type_Float = "float" Field_Type_Integer = "integer" Field_Type_Long = "long" Field_Type_Nested = "nested" Field_Type_Short = "short" Field_Type_String = "string" )
Constants associated with the Field.Type property. The type of the field.
const ( Notice_Severity_Error = "error" Notice_Severity_Warning = "warning" )
Constants associated with the Notice.Severity property. Severity level of the notice.
const ( ProjectDetails_Type_AnswerRetrieval = "answer_retrieval" ProjectDetails_Type_ContentMining = "content_mining" ProjectDetails_Type_DocumentRetrieval = "document_retrieval" ProjectDetails_Type_Other = "other" )
Constants associated with the ProjectDetails.Type property. The project type of this project.
const ( ProjectListDetails_Type_AnswerRetrieval = "answer_retrieval" ProjectListDetails_Type_ContentMining = "content_mining" ProjectListDetails_Type_DocumentRetrieval = "document_retrieval" ProjectListDetails_Type_Other = "other" )
Constants associated with the ProjectListDetails.Type property. The project type of this project.
const ( QueryResultMetadata_DocumentRetrievalSource_Curation = "curation" QueryResultMetadata_DocumentRetrievalSource_Search = "search" )
Constants associated with the QueryResultMetadata.DocumentRetrievalSource property. The document retrieval source that produced this search result.
const ( RetrievalDetails_DocumentRetrievalStrategy_RelevancyTraining = "relevancy_training" RetrievalDetails_DocumentRetrievalStrategy_Untrained = "untrained" )
Constants associated with the RetrievalDetails.DocumentRetrievalStrategy property. Identifies the document retrieval strategy used for this query. `relevancy_training` indicates that the results were returned using a relevancy trained model.
**Note**: In the event of trained collections being queried, but the trained model is not used to return results,
the **document_retrieval_strategy** will be listed as `untrained`.
const DefaultServiceName = "discovery"
DefaultServiceName is the default key used to find external configuration information.
const DefaultServiceURL = "https://api.us-south.discovery.watson.cloud.ibm.com"
DefaultServiceURL is the default URL to make service requests to.
const (
DeleteDocumentResponse_Status_Deleted = "deleted"
)
Constants associated with the DeleteDocumentResponse.Status property. Status of the document. A deleted document has the status deleted.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddDocumentOptions ¶
type AddDocumentOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The ID of the collection.
CollectionID *string `json:"collection_id" validate:"required"`
// The 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.
File io.ReadCloser `json:"file,omitempty"`
// The filename for file.
Filename *string `json:"filename,omitempty"`
// The content type of file.
FileContentType *string `json:"file_content_type,omitempty"`
// The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected.
//
//
// Example: “` {
// "Creator": "Johnny Appleseed",
// "Subject": "Apples"
// } “`.
Metadata *string `json:"metadata,omitempty"`
// When `true`, the uploaded document is added to the collection even if the data for that collection is shared with
// other collections.
XWatsonDiscoveryForce *bool `json:"X-Watson-Discovery-Force,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
AddDocumentOptions : The AddDocument options.
func (*AddDocumentOptions) SetCollectionID ¶
func (options *AddDocumentOptions) SetCollectionID(collectionID string) *AddDocumentOptions
SetCollectionID : Allow user to set CollectionID
func (*AddDocumentOptions) SetFile ¶
func (options *AddDocumentOptions) SetFile(file io.ReadCloser) *AddDocumentOptions
SetFile : Allow user to set File
func (*AddDocumentOptions) SetFileContentType ¶
func (options *AddDocumentOptions) SetFileContentType(fileContentType string) *AddDocumentOptions
SetFileContentType : Allow user to set FileContentType
func (*AddDocumentOptions) SetFilename ¶
func (options *AddDocumentOptions) SetFilename(filename string) *AddDocumentOptions
SetFilename : Allow user to set Filename
func (*AddDocumentOptions) SetHeaders ¶
func (options *AddDocumentOptions) SetHeaders(param map[string]string) *AddDocumentOptions
SetHeaders : Allow user to set Headers
func (*AddDocumentOptions) SetMetadata ¶
func (options *AddDocumentOptions) SetMetadata(metadata string) *AddDocumentOptions
SetMetadata : Allow user to set Metadata
func (*AddDocumentOptions) SetProjectID ¶
func (options *AddDocumentOptions) SetProjectID(projectID string) *AddDocumentOptions
SetProjectID : Allow user to set ProjectID
func (*AddDocumentOptions) SetXWatsonDiscoveryForce ¶
func (options *AddDocumentOptions) SetXWatsonDiscoveryForce(xWatsonDiscoveryForce bool) *AddDocumentOptions
SetXWatsonDiscoveryForce : Allow user to set XWatsonDiscoveryForce
type Collection ¶
type Collection struct {
// The unique identifier of the collection.
CollectionID *string `json:"collection_id,omitempty"`
// The name of the collection.
Name *string `json:"name,omitempty"`
}
Collection : A collection for storing documents.
type CollectionDetails ¶ added in v1.7.0
type CollectionDetails struct {
// The unique identifier of the collection.
CollectionID *string `json:"collection_id,omitempty"`
// The name of the collection.
Name *string `json:"name" validate:"required"`
// A description of the collection.
Description *string `json:"description,omitempty"`
// The date that the collection was created.
Created *strfmt.DateTime `json:"created,omitempty"`
// The language of the collection.
Language *string `json:"language,omitempty"`
// An array of enrichments that are applied to this collection.
Enrichments []CollectionEnrichment `json:"enrichments,omitempty"`
}
CollectionDetails : A collection for storing documents.
type CollectionEnrichment ¶ added in v1.7.0
type CollectionEnrichment struct {
// The unique identifier of this enrichment.
EnrichmentID *string `json:"enrichment_id,omitempty"`
// An array of field names that the enrichment is applied to.
Fields []string `json:"fields,omitempty"`
}
CollectionEnrichment : An object describing an Enrichment for a collection.
type Completions ¶
type Completions struct {
// Array of autcomplete suggestion based on the provided prefix.
Completions []string `json:"completions,omitempty"`
}
Completions : An object containing an array of autocompletion suggestions.
type ComponentSettingsAggregation ¶
type ComponentSettingsAggregation struct {
// Identifier used to map aggregation settings to aggregation configuration.
Name *string `json:"name,omitempty"`
// User-friendly alias for the aggregation.
Label *string `json:"label,omitempty"`
// Whether users is allowed to select more than one of the aggregation terms.
MultipleSelectionsAllowed *bool `json:"multiple_selections_allowed,omitempty"`
// Type of visualization to use when rendering the aggregation.
VisualizationType *string `json:"visualization_type,omitempty"`
}
ComponentSettingsAggregation : Display settings for aggregations.
type ComponentSettingsFieldsShown ¶
type ComponentSettingsFieldsShown struct {
// Body label.
Body *ComponentSettingsFieldsShownBody `json:"body,omitempty"`
// Title label.
Title *ComponentSettingsFieldsShownTitle `json:"title,omitempty"`
}
ComponentSettingsFieldsShown : Fields shown in the results section of the UI.
type ComponentSettingsFieldsShownBody ¶
type ComponentSettingsFieldsShownBody struct {
// Use the whole passage as the body.
UsePassage *bool `json:"use_passage,omitempty"`
// Use a specific field as the title.
Field *string `json:"field,omitempty"`
}
ComponentSettingsFieldsShownBody : Body label.
type ComponentSettingsFieldsShownTitle ¶
type ComponentSettingsFieldsShownTitle struct {
// Use a specific field as the title.
Field *string `json:"field,omitempty"`
}
ComponentSettingsFieldsShownTitle : Title label.
type ComponentSettingsResponse ¶
type ComponentSettingsResponse struct {
// Fields shown in the results section of the UI.
FieldsShown *ComponentSettingsFieldsShown `json:"fields_shown,omitempty"`
// Whether or not autocomplete is enabled.
Autocomplete *bool `json:"autocomplete,omitempty"`
// Whether or not structured search is enabled.
StructuredSearch *bool `json:"structured_search,omitempty"`
// Number or results shown per page.
ResultsPerPage *int64 `json:"results_per_page,omitempty"`
// a list of component setting aggregations.
Aggregations []ComponentSettingsAggregation `json:"aggregations,omitempty"`
}
ComponentSettingsResponse : The default component settings for this project.
type CreateCollectionOptions ¶ added in v1.7.0
type CreateCollectionOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The name of the collection.
Name *string `json:"name" validate:"required"`
// A description of the collection.
Description *string `json:"description,omitempty"`
// The language of the collection.
Language *string `json:"language,omitempty"`
// An array of enrichments that are applied to this collection.
Enrichments []CollectionEnrichment `json:"enrichments,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
CreateCollectionOptions : The CreateCollection options.
func (*CreateCollectionOptions) SetDescription ¶ added in v1.7.0
func (options *CreateCollectionOptions) SetDescription(description string) *CreateCollectionOptions
SetDescription : Allow user to set Description
func (*CreateCollectionOptions) SetEnrichments ¶ added in v1.7.0
func (options *CreateCollectionOptions) SetEnrichments(enrichments []CollectionEnrichment) *CreateCollectionOptions
SetEnrichments : Allow user to set Enrichments
func (*CreateCollectionOptions) SetHeaders ¶ added in v1.7.0
func (options *CreateCollectionOptions) SetHeaders(param map[string]string) *CreateCollectionOptions
SetHeaders : Allow user to set Headers
func (*CreateCollectionOptions) SetLanguage ¶ added in v1.7.0
func (options *CreateCollectionOptions) SetLanguage(language string) *CreateCollectionOptions
SetLanguage : Allow user to set Language
func (*CreateCollectionOptions) SetName ¶ added in v1.7.0
func (options *CreateCollectionOptions) SetName(name string) *CreateCollectionOptions
SetName : Allow user to set Name
func (*CreateCollectionOptions) SetProjectID ¶ added in v1.7.0
func (options *CreateCollectionOptions) SetProjectID(projectID string) *CreateCollectionOptions
SetProjectID : Allow user to set ProjectID
type CreateEnrichment ¶ added in v1.7.0
type CreateEnrichment struct {
// The human readable name for this enrichment.
Name *string `json:"name,omitempty"`
// The description of this enrichment.
Description *string `json:"description,omitempty"`
// The type of this enrichment.
Type *string `json:"type,omitempty"`
// A object containing options for the current enrichment.
Options *EnrichmentOptions `json:"options,omitempty"`
}
CreateEnrichment : Information about a specific enrichment.
type CreateEnrichmentOptions ¶ added in v1.7.0
type CreateEnrichmentOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// Information about a specific enrichment.
Enrichment *CreateEnrichment `json:"enrichment" validate:"required"`
// The enrichment file to upload.
File io.ReadCloser `json:"file,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
CreateEnrichmentOptions : The CreateEnrichment options.
func (*CreateEnrichmentOptions) SetEnrichment ¶ added in v1.7.0
func (options *CreateEnrichmentOptions) SetEnrichment(enrichment *CreateEnrichment) *CreateEnrichmentOptions
SetEnrichment : Allow user to set Enrichment
func (*CreateEnrichmentOptions) SetFile ¶ added in v1.7.0
func (options *CreateEnrichmentOptions) SetFile(file io.ReadCloser) *CreateEnrichmentOptions
SetFile : Allow user to set File
func (*CreateEnrichmentOptions) SetHeaders ¶ added in v1.7.0
func (options *CreateEnrichmentOptions) SetHeaders(param map[string]string) *CreateEnrichmentOptions
SetHeaders : Allow user to set Headers
func (*CreateEnrichmentOptions) SetProjectID ¶ added in v1.7.0
func (options *CreateEnrichmentOptions) SetProjectID(projectID string) *CreateEnrichmentOptions
SetProjectID : Allow user to set ProjectID
type CreateProjectOptions ¶ added in v1.7.0
type CreateProjectOptions struct {
// The human readable name of this project.
Name *string `json:"name" validate:"required"`
// The project type of this project.
Type *string `json:"type" validate:"required"`
// Default query parameters for this project.
DefaultQueryParameters *DefaultQueryParams `json:"default_query_parameters,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
CreateProjectOptions : The CreateProject options.
func (*CreateProjectOptions) SetDefaultQueryParameters ¶ added in v1.7.0
func (options *CreateProjectOptions) SetDefaultQueryParameters(defaultQueryParameters *DefaultQueryParams) *CreateProjectOptions
SetDefaultQueryParameters : Allow user to set DefaultQueryParameters
func (*CreateProjectOptions) SetHeaders ¶ added in v1.7.0
func (options *CreateProjectOptions) SetHeaders(param map[string]string) *CreateProjectOptions
SetHeaders : Allow user to set Headers
func (*CreateProjectOptions) SetName ¶ added in v1.7.0
func (options *CreateProjectOptions) SetName(name string) *CreateProjectOptions
SetName : Allow user to set Name
func (*CreateProjectOptions) SetType ¶ added in v1.7.0
func (options *CreateProjectOptions) SetType(typeVar string) *CreateProjectOptions
SetType : Allow user to set Type
type CreateTrainingQueryOptions ¶
type CreateTrainingQueryOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The natural text query for the training query.
NaturalLanguageQuery *string `json:"natural_language_query" validate:"required"`
// Array of training examples.
Examples []TrainingExample `json:"examples" validate:"required"`
// The filter used on the collection before the **natural_language_query** is applied.
Filter *string `json:"filter,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
CreateTrainingQueryOptions : The CreateTrainingQuery options.
func (*CreateTrainingQueryOptions) SetExamples ¶
func (options *CreateTrainingQueryOptions) SetExamples(examples []TrainingExample) *CreateTrainingQueryOptions
SetExamples : Allow user to set Examples
func (*CreateTrainingQueryOptions) SetFilter ¶
func (options *CreateTrainingQueryOptions) SetFilter(filter string) *CreateTrainingQueryOptions
SetFilter : Allow user to set Filter
func (*CreateTrainingQueryOptions) SetHeaders ¶
func (options *CreateTrainingQueryOptions) SetHeaders(param map[string]string) *CreateTrainingQueryOptions
SetHeaders : Allow user to set Headers
func (*CreateTrainingQueryOptions) SetNaturalLanguageQuery ¶
func (options *CreateTrainingQueryOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *CreateTrainingQueryOptions
SetNaturalLanguageQuery : Allow user to set NaturalLanguageQuery
func (*CreateTrainingQueryOptions) SetProjectID ¶
func (options *CreateTrainingQueryOptions) SetProjectID(projectID string) *CreateTrainingQueryOptions
SetProjectID : Allow user to set ProjectID
type DefaultQueryParams ¶ added in v1.7.0
type DefaultQueryParams struct {
// An array of collection identifiers to query. If empty or omitted all collections in the project are queried.
CollectionIds []string `json:"collection_ids,omitempty"`
// Default settings configuration for passage search options.
Passages *DefaultQueryParamsPassages `json:"passages,omitempty"`
// Default project query settings for table results.
TableResults *DefaultQueryParamsTableResults `json:"table_results,omitempty"`
// A string representing the default aggregation query for the project.
Aggregation *string `json:"aggregation,omitempty"`
// Object containing suggested refinement settings.
SuggestedRefinements *DefaultQueryParamsSuggestedRefinements `json:"suggested_refinements,omitempty"`
// When `true`, a spelling suggestions for the query are retuned by default.
SpellingSuggestions *bool `json:"spelling_suggestions,omitempty"`
// When `true`, a highlights for the query are retuned by default.
Highlight *bool `json:"highlight,omitempty"`
// The number of document results returned by default.
Count *int64 `json:"count,omitempty"`
// A comma separated list of document fields to sort results by default.
Sort *string `json:"sort,omitempty"`
// An array of field names to return in document results if present by default.
Return []string `json:"return,omitempty"`
}
DefaultQueryParams : Default query parameters for this project.
type DefaultQueryParamsPassages ¶ added in v1.7.0
type DefaultQueryParamsPassages struct {
// When `true`, a passage search is performed by default.
Enabled *bool `json:"enabled,omitempty"`
// The number of passages to return.
Count *int64 `json:"count,omitempty"`
// An array of field names to perfom the passage search on.
Fields []string `json:"fields,omitempty"`
// The approximate number of characters that each returned passage will contain.
Characters *int64 `json:"characters,omitempty"`
// When `true` the number of passages that can be returned from a single document is restricted to the
// *max_per_document* value.
PerDocument *bool `json:"per_document,omitempty"`
// The default maximum number of passages that can be taken from a single document as the result of a passage query.
MaxPerDocument *int64 `json:"max_per_document,omitempty"`
}
DefaultQueryParamsPassages : Default settings configuration for passage search options.
type DefaultQueryParamsSuggestedRefinements ¶ added in v1.7.0
type DefaultQueryParamsSuggestedRefinements struct {
// When `true`, a suggested refinements for the query are retuned by default.
Enabled *bool `json:"enabled,omitempty"`
// The number of suggested refinements to return by default.
Count *int64 `json:"count,omitempty"`
}
DefaultQueryParamsSuggestedRefinements : Object containing suggested refinement settings.
type DefaultQueryParamsTableResults ¶ added in v1.7.0
type DefaultQueryParamsTableResults struct {
// When `true`, a table results for the query are retuned by default.
Enabled *bool `json:"enabled,omitempty"`
// The number of table results to return by default.
Count *int64 `json:"count,omitempty"`
// The number of table results to include in each result document.
PerDocument *int64 `json:"per_document,omitempty"`
}
DefaultQueryParamsTableResults : Default project query settings for table results.
type DeleteCollectionOptions ¶ added in v1.7.0
type DeleteCollectionOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The ID of the collection.
CollectionID *string `json:"collection_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
DeleteCollectionOptions : The DeleteCollection options.
func (*DeleteCollectionOptions) SetCollectionID ¶ added in v1.7.0
func (options *DeleteCollectionOptions) SetCollectionID(collectionID string) *DeleteCollectionOptions
SetCollectionID : Allow user to set CollectionID
func (*DeleteCollectionOptions) SetHeaders ¶ added in v1.7.0
func (options *DeleteCollectionOptions) SetHeaders(param map[string]string) *DeleteCollectionOptions
SetHeaders : Allow user to set Headers
func (*DeleteCollectionOptions) SetProjectID ¶ added in v1.7.0
func (options *DeleteCollectionOptions) SetProjectID(projectID string) *DeleteCollectionOptions
SetProjectID : Allow user to set ProjectID
type DeleteDocumentOptions ¶
type DeleteDocumentOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The ID of the collection.
CollectionID *string `json:"collection_id" validate:"required"`
// The ID of the document.
DocumentID *string `json:"document_id" validate:"required"`
// When `true`, the uploaded document is added to the collection even if the data for that collection is shared with
// other collections.
XWatsonDiscoveryForce *bool `json:"X-Watson-Discovery-Force,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
DeleteDocumentOptions : The DeleteDocument options.
func (*DeleteDocumentOptions) SetCollectionID ¶
func (options *DeleteDocumentOptions) SetCollectionID(collectionID string) *DeleteDocumentOptions
SetCollectionID : Allow user to set CollectionID
func (*DeleteDocumentOptions) SetDocumentID ¶
func (options *DeleteDocumentOptions) SetDocumentID(documentID string) *DeleteDocumentOptions
SetDocumentID : Allow user to set DocumentID
func (*DeleteDocumentOptions) SetHeaders ¶
func (options *DeleteDocumentOptions) SetHeaders(param map[string]string) *DeleteDocumentOptions
SetHeaders : Allow user to set Headers
func (*DeleteDocumentOptions) SetProjectID ¶
func (options *DeleteDocumentOptions) SetProjectID(projectID string) *DeleteDocumentOptions
SetProjectID : Allow user to set ProjectID
func (*DeleteDocumentOptions) SetXWatsonDiscoveryForce ¶
func (options *DeleteDocumentOptions) SetXWatsonDiscoveryForce(xWatsonDiscoveryForce bool) *DeleteDocumentOptions
SetXWatsonDiscoveryForce : Allow user to set XWatsonDiscoveryForce
type DeleteDocumentResponse ¶
type DeleteDocumentResponse struct {
// The unique identifier of the document.
DocumentID *string `json:"document_id,omitempty"`
// Status of the document. A deleted document has the status deleted.
Status *string `json:"status,omitempty"`
}
DeleteDocumentResponse : Information returned when a document is deleted.
type DeleteEnrichmentOptions ¶ added in v1.7.0
type DeleteEnrichmentOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The ID of the enrichment.
EnrichmentID *string `json:"enrichment_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
DeleteEnrichmentOptions : The DeleteEnrichment options.
func (*DeleteEnrichmentOptions) SetEnrichmentID ¶ added in v1.7.0
func (options *DeleteEnrichmentOptions) SetEnrichmentID(enrichmentID string) *DeleteEnrichmentOptions
SetEnrichmentID : Allow user to set EnrichmentID
func (*DeleteEnrichmentOptions) SetHeaders ¶ added in v1.7.0
func (options *DeleteEnrichmentOptions) SetHeaders(param map[string]string) *DeleteEnrichmentOptions
SetHeaders : Allow user to set Headers
func (*DeleteEnrichmentOptions) SetProjectID ¶ added in v1.7.0
func (options *DeleteEnrichmentOptions) SetProjectID(projectID string) *DeleteEnrichmentOptions
SetProjectID : Allow user to set ProjectID
type DeleteProjectOptions ¶ added in v1.7.0
type DeleteProjectOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
DeleteProjectOptions : The DeleteProject options.
func (*DeleteProjectOptions) SetHeaders ¶ added in v1.7.0
func (options *DeleteProjectOptions) SetHeaders(param map[string]string) *DeleteProjectOptions
SetHeaders : Allow user to set Headers
func (*DeleteProjectOptions) SetProjectID ¶ added in v1.7.0
func (options *DeleteProjectOptions) SetProjectID(projectID string) *DeleteProjectOptions
SetProjectID : Allow user to set ProjectID
type DeleteTrainingQueriesOptions ¶
type DeleteTrainingQueriesOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
DeleteTrainingQueriesOptions : The DeleteTrainingQueries options.
func (*DeleteTrainingQueriesOptions) SetHeaders ¶
func (options *DeleteTrainingQueriesOptions) SetHeaders(param map[string]string) *DeleteTrainingQueriesOptions
SetHeaders : Allow user to set Headers
func (*DeleteTrainingQueriesOptions) SetProjectID ¶
func (options *DeleteTrainingQueriesOptions) SetProjectID(projectID string) *DeleteTrainingQueriesOptions
SetProjectID : Allow user to set ProjectID
type DeleteUserDataOptions ¶ added in v1.7.0
type DeleteUserDataOptions struct {
// The customer ID for which all data is to be deleted.
CustomerID *string `json:"customer_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
DeleteUserDataOptions : The DeleteUserData options.
func (*DeleteUserDataOptions) SetCustomerID ¶ added in v1.7.0
func (options *DeleteUserDataOptions) SetCustomerID(customerID string) *DeleteUserDataOptions
SetCustomerID : Allow user to set CustomerID
func (*DeleteUserDataOptions) SetHeaders ¶ added in v1.7.0
func (options *DeleteUserDataOptions) SetHeaders(param map[string]string) *DeleteUserDataOptions
SetHeaders : Allow user to set Headers
type DiscoveryV2 ¶
type DiscoveryV2 struct {
Service *core.BaseService
Version string
}
DiscoveryV2 : IBM Watson™ Discovery is a cognitive search and content analytics engine that you can add to applications to identify patterns, trends and actionable insights to drive better decision-making. Securely unify structured and unstructured data with pre-enriched content, and use a simplified query language to eliminate the need for manual filtering of results.
Version: 2.0 See: https://cloud.ibm.com/docs/discovery-data/
func NewDiscoveryV2 ¶
func NewDiscoveryV2(options *DiscoveryV2Options) (service *DiscoveryV2, err error)
NewDiscoveryV2 : constructs an instance of DiscoveryV2 with passed in options.
func (*DiscoveryV2) AddDocument ¶
func (discovery *DiscoveryV2) AddDocument(addDocumentOptions *AddDocumentOptions) (result *DocumentAccepted, response *core.DetailedResponse, err error)
AddDocument : 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.
func (*DiscoveryV2) CreateCollection ¶ added in v1.7.0
func (discovery *DiscoveryV2) CreateCollection(createCollectionOptions *CreateCollectionOptions) (result *CollectionDetails, response *core.DetailedResponse, err error)
CreateCollection : Create a collection Create a new collection in the specified project.
func (*DiscoveryV2) CreateEnrichment ¶ added in v1.7.0
func (discovery *DiscoveryV2) CreateEnrichment(createEnrichmentOptions *CreateEnrichmentOptions) (result *Enrichment, response *core.DetailedResponse, err error)
CreateEnrichment : Create an enrichment Create an enrichment for use with the specified project/.
func (*DiscoveryV2) CreateProject ¶ added in v1.7.0
func (discovery *DiscoveryV2) CreateProject(createProjectOptions *CreateProjectOptions) (result *ProjectDetails, response *core.DetailedResponse, err error)
CreateProject : Create a Project Create a new project for this instance.
func (*DiscoveryV2) CreateTrainingQuery ¶
func (discovery *DiscoveryV2) CreateTrainingQuery(createTrainingQueryOptions *CreateTrainingQueryOptions) (result *TrainingQuery, response *core.DetailedResponse, err error)
CreateTrainingQuery : Create training query Add a query to the training data for this project. The query can contain a filter and natural language query.
func (*DiscoveryV2) DeleteCollection ¶ added in v1.7.0
func (discovery *DiscoveryV2) DeleteCollection(deleteCollectionOptions *DeleteCollectionOptions) (response *core.DetailedResponse, err error)
DeleteCollection : Delete a collection Deletes the specified collection from the project. All documents stored in the specified collection and not shared is also deleted.
func (*DiscoveryV2) DeleteDocument ¶
func (discovery *DiscoveryV2) DeleteDocument(deleteDocumentOptions *DeleteDocumentOptions) (result *DeleteDocumentResponse, response *core.DetailedResponse, err error)
DeleteDocument : 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.
func (*DiscoveryV2) DeleteEnrichment ¶ added in v1.7.0
func (discovery *DiscoveryV2) DeleteEnrichment(deleteEnrichmentOptions *DeleteEnrichmentOptions) (response *core.DetailedResponse, err error)
DeleteEnrichment : Delete an enrichment Deletes an existing enrichment from the specified project.
**Note:** Only enrichments that have been manually created can be deleted.
func (*DiscoveryV2) DeleteProject ¶ added in v1.7.0
func (discovery *DiscoveryV2) DeleteProject(deleteProjectOptions *DeleteProjectOptions) (response *core.DetailedResponse, err error)
DeleteProject : Delete a project Deletes the specified project.
**Important:** Deleting a project deletes everything that is part of the specified project, including all collections.
func (*DiscoveryV2) DeleteTrainingQueries ¶
func (discovery *DiscoveryV2) DeleteTrainingQueries(deleteTrainingQueriesOptions *DeleteTrainingQueriesOptions) (response *core.DetailedResponse, err error)
DeleteTrainingQueries : Delete training queries Removes all training queries for the specified project.
func (*DiscoveryV2) DeleteUserData ¶ added in v1.7.0
func (discovery *DiscoveryV2) DeleteUserData(deleteUserDataOptions *DeleteUserDataOptions) (response *core.DetailedResponse, err error)
DeleteUserData : 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-data?topic=discovery-data-information-security#information-security).
**Note:** This method is only supported on IBM Cloud instances of Discovery.
func (*DiscoveryV2) DisableSSLVerification ¶
func (discovery *DiscoveryV2) DisableSSLVerification()
DisableSSLVerification bypasses verification of the server's SSL certificate
func (*DiscoveryV2) GetAutocompletion ¶
func (discovery *DiscoveryV2) GetAutocompletion(getAutocompletionOptions *GetAutocompletionOptions) (result *Completions, response *core.DetailedResponse, err error)
GetAutocompletion : Get Autocomplete Suggestions Returns completion query suggestions for the specified prefix.
func (*DiscoveryV2) GetCollection ¶ added in v1.7.0
func (discovery *DiscoveryV2) GetCollection(getCollectionOptions *GetCollectionOptions) (result *CollectionDetails, response *core.DetailedResponse, err error)
GetCollection : Get collection Get details about the specified collection.
func (*DiscoveryV2) GetComponentSettings ¶
func (discovery *DiscoveryV2) GetComponentSettings(getComponentSettingsOptions *GetComponentSettingsOptions) (result *ComponentSettingsResponse, response *core.DetailedResponse, err error)
GetComponentSettings : List component settings Returns default configuration settings for components.
func (*DiscoveryV2) GetEnrichment ¶ added in v1.7.0
func (discovery *DiscoveryV2) GetEnrichment(getEnrichmentOptions *GetEnrichmentOptions) (result *Enrichment, response *core.DetailedResponse, err error)
GetEnrichment : Get enrichment Get details about a specific enrichment.
func (*DiscoveryV2) GetProject ¶ added in v1.7.0
func (discovery *DiscoveryV2) GetProject(getProjectOptions *GetProjectOptions) (result *ProjectDetails, response *core.DetailedResponse, err error)
GetProject : Get project Get details on the specified project.
func (*DiscoveryV2) GetTrainingQuery ¶
func (discovery *DiscoveryV2) GetTrainingQuery(getTrainingQueryOptions *GetTrainingQueryOptions) (result *TrainingQuery, response *core.DetailedResponse, err error)
GetTrainingQuery : Get a training data query Get details for a specific training data query, including the query string and all examples.
func (*DiscoveryV2) ListCollections ¶
func (discovery *DiscoveryV2) ListCollections(listCollectionsOptions *ListCollectionsOptions) (result *ListCollectionsResponse, response *core.DetailedResponse, err error)
ListCollections : List collections Lists existing collections for the specified project.
func (*DiscoveryV2) ListEnrichments ¶ added in v1.7.0
func (discovery *DiscoveryV2) ListEnrichments(listEnrichmentsOptions *ListEnrichmentsOptions) (result *Enrichments, response *core.DetailedResponse, err error)
ListEnrichments : List Enrichments List the enrichments available to this project.
func (*DiscoveryV2) ListFields ¶
func (discovery *DiscoveryV2) ListFields(listFieldsOptions *ListFieldsOptions) (result *ListFieldsResponse, response *core.DetailedResponse, err error)
ListFields : List fields Gets a list of the unique fields (and their types) stored in the the specified collections.
func (*DiscoveryV2) ListProjects ¶ added in v1.7.0
func (discovery *DiscoveryV2) ListProjects(listProjectsOptions *ListProjectsOptions) (result *ListProjectsResponse, response *core.DetailedResponse, err error)
ListProjects : List projects Lists existing projects for this instance.
func (*DiscoveryV2) ListTrainingQueries ¶
func (discovery *DiscoveryV2) ListTrainingQueries(listTrainingQueriesOptions *ListTrainingQueriesOptions) (result *TrainingQuerySet, response *core.DetailedResponse, err error)
ListTrainingQueries : List training queries List the training queries for the specified project.
func (*DiscoveryV2) NewAddDocumentOptions ¶
func (discovery *DiscoveryV2) NewAddDocumentOptions(projectID string, collectionID string) *AddDocumentOptions
NewAddDocumentOptions : Instantiate AddDocumentOptions
func (*DiscoveryV2) NewCollectionDetails ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewCollectionDetails(name string) (model *CollectionDetails, err error)
NewCollectionDetails : Instantiate CollectionDetails (Generic Model Constructor)
func (*DiscoveryV2) NewCreateCollectionOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewCreateCollectionOptions(projectID string, name string) *CreateCollectionOptions
NewCreateCollectionOptions : Instantiate CreateCollectionOptions
func (*DiscoveryV2) NewCreateEnrichmentOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewCreateEnrichmentOptions(projectID string, enrichment *CreateEnrichment) *CreateEnrichmentOptions
NewCreateEnrichmentOptions : Instantiate CreateEnrichmentOptions
func (*DiscoveryV2) NewCreateProjectOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewCreateProjectOptions(name string, typeVar string) *CreateProjectOptions
NewCreateProjectOptions : Instantiate CreateProjectOptions
func (*DiscoveryV2) NewCreateTrainingQueryOptions ¶
func (discovery *DiscoveryV2) NewCreateTrainingQueryOptions(projectID string, naturalLanguageQuery string, examples []TrainingExample) *CreateTrainingQueryOptions
NewCreateTrainingQueryOptions : Instantiate CreateTrainingQueryOptions
func (*DiscoveryV2) NewDeleteCollectionOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewDeleteCollectionOptions(projectID string, collectionID string) *DeleteCollectionOptions
NewDeleteCollectionOptions : Instantiate DeleteCollectionOptions
func (*DiscoveryV2) NewDeleteDocumentOptions ¶
func (discovery *DiscoveryV2) NewDeleteDocumentOptions(projectID string, collectionID string, documentID string) *DeleteDocumentOptions
NewDeleteDocumentOptions : Instantiate DeleteDocumentOptions
func (*DiscoveryV2) NewDeleteEnrichmentOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewDeleteEnrichmentOptions(projectID string, enrichmentID string) *DeleteEnrichmentOptions
NewDeleteEnrichmentOptions : Instantiate DeleteEnrichmentOptions
func (*DiscoveryV2) NewDeleteProjectOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewDeleteProjectOptions(projectID string) *DeleteProjectOptions
NewDeleteProjectOptions : Instantiate DeleteProjectOptions
func (*DiscoveryV2) NewDeleteTrainingQueriesOptions ¶
func (discovery *DiscoveryV2) NewDeleteTrainingQueriesOptions(projectID string) *DeleteTrainingQueriesOptions
NewDeleteTrainingQueriesOptions : Instantiate DeleteTrainingQueriesOptions
func (*DiscoveryV2) NewDeleteUserDataOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewDeleteUserDataOptions(customerID string) *DeleteUserDataOptions
NewDeleteUserDataOptions : Instantiate DeleteUserDataOptions
func (*DiscoveryV2) NewGetAutocompletionOptions ¶
func (discovery *DiscoveryV2) NewGetAutocompletionOptions(projectID string, prefix string) *GetAutocompletionOptions
NewGetAutocompletionOptions : Instantiate GetAutocompletionOptions
func (*DiscoveryV2) NewGetCollectionOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewGetCollectionOptions(projectID string, collectionID string) *GetCollectionOptions
NewGetCollectionOptions : Instantiate GetCollectionOptions
func (*DiscoveryV2) NewGetComponentSettingsOptions ¶
func (discovery *DiscoveryV2) NewGetComponentSettingsOptions(projectID string) *GetComponentSettingsOptions
NewGetComponentSettingsOptions : Instantiate GetComponentSettingsOptions
func (*DiscoveryV2) NewGetEnrichmentOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewGetEnrichmentOptions(projectID string, enrichmentID string) *GetEnrichmentOptions
NewGetEnrichmentOptions : Instantiate GetEnrichmentOptions
func (*DiscoveryV2) NewGetProjectOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewGetProjectOptions(projectID string) *GetProjectOptions
NewGetProjectOptions : Instantiate GetProjectOptions
func (*DiscoveryV2) NewGetTrainingQueryOptions ¶
func (discovery *DiscoveryV2) NewGetTrainingQueryOptions(projectID string, queryID string) *GetTrainingQueryOptions
NewGetTrainingQueryOptions : Instantiate GetTrainingQueryOptions
func (*DiscoveryV2) NewListCollectionsOptions ¶
func (discovery *DiscoveryV2) NewListCollectionsOptions(projectID string) *ListCollectionsOptions
NewListCollectionsOptions : Instantiate ListCollectionsOptions
func (*DiscoveryV2) NewListEnrichmentsOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewListEnrichmentsOptions(projectID string) *ListEnrichmentsOptions
NewListEnrichmentsOptions : Instantiate ListEnrichmentsOptions
func (*DiscoveryV2) NewListFieldsOptions ¶
func (discovery *DiscoveryV2) NewListFieldsOptions(projectID string) *ListFieldsOptions
NewListFieldsOptions : Instantiate ListFieldsOptions
func (*DiscoveryV2) NewListProjectsOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewListProjectsOptions() *ListProjectsOptions
NewListProjectsOptions : Instantiate ListProjectsOptions
func (*DiscoveryV2) NewListTrainingQueriesOptions ¶
func (discovery *DiscoveryV2) NewListTrainingQueriesOptions(projectID string) *ListTrainingQueriesOptions
NewListTrainingQueriesOptions : Instantiate ListTrainingQueriesOptions
func (*DiscoveryV2) NewQueryNoticesOptions ¶
func (discovery *DiscoveryV2) NewQueryNoticesOptions(projectID string) *QueryNoticesOptions
NewQueryNoticesOptions : Instantiate QueryNoticesOptions
func (*DiscoveryV2) NewQueryOptions ¶
func (discovery *DiscoveryV2) NewQueryOptions(projectID string) *QueryOptions
NewQueryOptions : Instantiate QueryOptions
func (*DiscoveryV2) NewTrainingExample ¶ added in v1.3.0
func (discovery *DiscoveryV2) NewTrainingExample(documentID string, collectionID string, relevance int64) (model *TrainingExample, err error)
NewTrainingExample : Instantiate TrainingExample (Generic Model Constructor)
func (*DiscoveryV2) NewTrainingQuery ¶ added in v1.3.0
func (discovery *DiscoveryV2) NewTrainingQuery(naturalLanguageQuery string, examples []TrainingExample) (model *TrainingQuery, err error)
NewTrainingQuery : Instantiate TrainingQuery (Generic Model Constructor)
func (*DiscoveryV2) NewUpdateCollectionOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewUpdateCollectionOptions(projectID string, collectionID string) *UpdateCollectionOptions
NewUpdateCollectionOptions : Instantiate UpdateCollectionOptions
func (*DiscoveryV2) NewUpdateDocumentOptions ¶
func (discovery *DiscoveryV2) NewUpdateDocumentOptions(projectID string, collectionID string, documentID string) *UpdateDocumentOptions
NewUpdateDocumentOptions : Instantiate UpdateDocumentOptions
func (*DiscoveryV2) NewUpdateEnrichmentOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewUpdateEnrichmentOptions(projectID string, enrichmentID string, name string) *UpdateEnrichmentOptions
NewUpdateEnrichmentOptions : Instantiate UpdateEnrichmentOptions
func (*DiscoveryV2) NewUpdateProjectOptions ¶ added in v1.7.0
func (discovery *DiscoveryV2) NewUpdateProjectOptions(projectID string) *UpdateProjectOptions
NewUpdateProjectOptions : Instantiate UpdateProjectOptions
func (*DiscoveryV2) NewUpdateTrainingQueryOptions ¶
func (discovery *DiscoveryV2) NewUpdateTrainingQueryOptions(projectID string, queryID string, naturalLanguageQuery string, examples []TrainingExample) *UpdateTrainingQueryOptions
NewUpdateTrainingQueryOptions : Instantiate UpdateTrainingQueryOptions
func (*DiscoveryV2) Query ¶
func (discovery *DiscoveryV2) Query(queryOptions *QueryOptions) (result *QueryResponse, response *core.DetailedResponse, err error)
Query : Query a project By using this method, you can construct queries. For details, see the [Discovery documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-query-concepts). The default query parameters are defined by the settings for this project, see the [Discovery documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-project-defaults) for an overview of the standard default settings, and see [the Projects API documentation](#create-project) for details about how to set custom default query settings.
func (*DiscoveryV2) QueryNotices ¶
func (discovery *DiscoveryV2) QueryNotices(queryNoticesOptions *QueryNoticesOptions) (result *QueryNoticesResponse, response *core.DetailedResponse, err error)
QueryNotices : 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.
func (*DiscoveryV2) SetServiceURL ¶
func (discovery *DiscoveryV2) SetServiceURL(url string) error
SetServiceURL sets the service URL
func (*DiscoveryV2) UpdateCollection ¶ added in v1.7.0
func (discovery *DiscoveryV2) UpdateCollection(updateCollectionOptions *UpdateCollectionOptions) (result *CollectionDetails, response *core.DetailedResponse, err error)
UpdateCollection : Update a collection Updates the specified collection's name, description, and enrichments.
func (*DiscoveryV2) UpdateDocument ¶
func (discovery *DiscoveryV2) UpdateDocument(updateDocumentOptions *UpdateDocumentOptions) (result *DocumentAccepted, response *core.DetailedResponse, err error)
UpdateDocument : 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.
func (*DiscoveryV2) UpdateEnrichment ¶ added in v1.7.0
func (discovery *DiscoveryV2) UpdateEnrichment(updateEnrichmentOptions *UpdateEnrichmentOptions) (result *Enrichment, response *core.DetailedResponse, err error)
UpdateEnrichment : Update an enrichment Updates an existing enrichment's name and description.
func (*DiscoveryV2) UpdateProject ¶ added in v1.7.0
func (discovery *DiscoveryV2) UpdateProject(updateProjectOptions *UpdateProjectOptions) (result *ProjectDetails, response *core.DetailedResponse, err error)
UpdateProject : Update a project Update the specified project's name.
func (*DiscoveryV2) UpdateTrainingQuery ¶
func (discovery *DiscoveryV2) UpdateTrainingQuery(updateTrainingQueryOptions *UpdateTrainingQueryOptions) (result *TrainingQuery, response *core.DetailedResponse, err error)
UpdateTrainingQuery : Update a training query Updates an existing training query and it's examples.
type DiscoveryV2Options ¶
type DiscoveryV2Options struct {
ServiceName string
URL string
Authenticator core.Authenticator
Version string
}
DiscoveryV2Options : Service options
type DocumentAccepted ¶
type DocumentAccepted struct {
// The unique identifier of the ingested document.
DocumentID *string `json:"document_id,omitempty"`
// Status of the document in the ingestion process. A status of `processing` is returned for documents that are
// ingested with a *version* date before `2019-01-01`. The `pending` status is returned for all others.
Status *string `json:"status,omitempty"`
}
DocumentAccepted : Information returned after an uploaded document is accepted.
type DocumentAttribute ¶
type DocumentAttribute struct {
// The type of attribute.
Type *string `json:"type,omitempty"`
// The text associated with the attribute.
Text *string `json:"text,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *TableElementLocation `json:"location,omitempty"`
}
DocumentAttribute : List of document attributes.
type Enrichment ¶ added in v1.7.0
type Enrichment struct {
// The unique identifier of this enrichment.
EnrichmentID *string `json:"enrichment_id,omitempty"`
// The human readable name for this enrichment.
Name *string `json:"name,omitempty"`
// The description of this enrichment.
Description *string `json:"description,omitempty"`
// The type of this enrichment.
Type *string `json:"type,omitempty"`
// A object containing options for the current enrichment.
Options *EnrichmentOptions `json:"options,omitempty"`
}
Enrichment : Information about a specific enrichment.
type EnrichmentOptions ¶ added in v1.7.0
type EnrichmentOptions struct {
// An array of supported languages for this enrichment.
Languages []string `json:"languages,omitempty"`
// The type of entity. Required when creating `dictionary` and `regular_expression` **type** enrichment. Not valid when
// creating any other type of enrichment.
EntityType *string `json:"entity_type,omitempty"`
// The regular expression to apply for this enrichment. Required only when the **type** of enrichment being created is
// a `regular_expression`. Not valid when creating any other type of enrichment.
RegularExpression *string `json:"regular_expression,omitempty"`
// The name of the result document field that this enrichment creates. Required only when the enrichment **type** is
// `rule_based`. Not valid when creating any other type of enrichment.
ResultField *string `json:"result_field,omitempty"`
}
EnrichmentOptions : A object containing options for the current enrichment.
type Enrichments ¶ added in v1.7.0
type Enrichments struct {
// An array of enrichment definitions.
Enrichments []Enrichment `json:"enrichments,omitempty"`
}
Enrichments : An object containing an array of enrichment definitions.
type Field ¶
type Field struct {
// The name of the field.
Field *string `json:"field,omitempty"`
// The type of the field.
Type *string `json:"type,omitempty"`
// The collection Id of the collection where the field was found.
CollectionID *string `json:"collection_id,omitempty"`
}
Field : Object containing field details.
type GetAutocompletionOptions ¶
type GetAutocompletionOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The prefix to use for autocompletion. For example, the prefix `Ho` could autocomplete to `Hot`, `Housing`, or `How
// do I upgrade`. Possible completions are.
Prefix *string `json:"prefix" validate:"required"`
// Comma separated list of the collection IDs. If this parameter is not specified, all collections in the project are
// used.
CollectionIds []string `json:"collection_ids,omitempty"`
// The field in the result documents that autocompletion suggestions are identified from.
Field *string `json:"field,omitempty"`
// The number of autocompletion suggestions to return.
Count *int64 `json:"count,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
GetAutocompletionOptions : The GetAutocompletion options.
func (*GetAutocompletionOptions) SetCollectionIds ¶
func (options *GetAutocompletionOptions) SetCollectionIds(collectionIds []string) *GetAutocompletionOptions
SetCollectionIds : Allow user to set CollectionIds
func (*GetAutocompletionOptions) SetCount ¶
func (options *GetAutocompletionOptions) SetCount(count int64) *GetAutocompletionOptions
SetCount : Allow user to set Count
func (*GetAutocompletionOptions) SetField ¶
func (options *GetAutocompletionOptions) SetField(field string) *GetAutocompletionOptions
SetField : Allow user to set Field
func (*GetAutocompletionOptions) SetHeaders ¶
func (options *GetAutocompletionOptions) SetHeaders(param map[string]string) *GetAutocompletionOptions
SetHeaders : Allow user to set Headers
func (*GetAutocompletionOptions) SetPrefix ¶
func (options *GetAutocompletionOptions) SetPrefix(prefix string) *GetAutocompletionOptions
SetPrefix : Allow user to set Prefix
func (*GetAutocompletionOptions) SetProjectID ¶
func (options *GetAutocompletionOptions) SetProjectID(projectID string) *GetAutocompletionOptions
SetProjectID : Allow user to set ProjectID
type GetCollectionOptions ¶ added in v1.7.0
type GetCollectionOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The ID of the collection.
CollectionID *string `json:"collection_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
GetCollectionOptions : The GetCollection options.
func (*GetCollectionOptions) SetCollectionID ¶ added in v1.7.0
func (options *GetCollectionOptions) SetCollectionID(collectionID string) *GetCollectionOptions
SetCollectionID : Allow user to set CollectionID
func (*GetCollectionOptions) SetHeaders ¶ added in v1.7.0
func (options *GetCollectionOptions) SetHeaders(param map[string]string) *GetCollectionOptions
SetHeaders : Allow user to set Headers
func (*GetCollectionOptions) SetProjectID ¶ added in v1.7.0
func (options *GetCollectionOptions) SetProjectID(projectID string) *GetCollectionOptions
SetProjectID : Allow user to set ProjectID
type GetComponentSettingsOptions ¶
type GetComponentSettingsOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
GetComponentSettingsOptions : The GetComponentSettings options.
func (*GetComponentSettingsOptions) SetHeaders ¶
func (options *GetComponentSettingsOptions) SetHeaders(param map[string]string) *GetComponentSettingsOptions
SetHeaders : Allow user to set Headers
func (*GetComponentSettingsOptions) SetProjectID ¶
func (options *GetComponentSettingsOptions) SetProjectID(projectID string) *GetComponentSettingsOptions
SetProjectID : Allow user to set ProjectID
type GetEnrichmentOptions ¶ added in v1.7.0
type GetEnrichmentOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The ID of the enrichment.
EnrichmentID *string `json:"enrichment_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
GetEnrichmentOptions : The GetEnrichment options.
func (*GetEnrichmentOptions) SetEnrichmentID ¶ added in v1.7.0
func (options *GetEnrichmentOptions) SetEnrichmentID(enrichmentID string) *GetEnrichmentOptions
SetEnrichmentID : Allow user to set EnrichmentID
func (*GetEnrichmentOptions) SetHeaders ¶ added in v1.7.0
func (options *GetEnrichmentOptions) SetHeaders(param map[string]string) *GetEnrichmentOptions
SetHeaders : Allow user to set Headers
func (*GetEnrichmentOptions) SetProjectID ¶ added in v1.7.0
func (options *GetEnrichmentOptions) SetProjectID(projectID string) *GetEnrichmentOptions
SetProjectID : Allow user to set ProjectID
type GetProjectOptions ¶ added in v1.7.0
type GetProjectOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
GetProjectOptions : The GetProject options.
func (*GetProjectOptions) SetHeaders ¶ added in v1.7.0
func (options *GetProjectOptions) SetHeaders(param map[string]string) *GetProjectOptions
SetHeaders : Allow user to set Headers
func (*GetProjectOptions) SetProjectID ¶ added in v1.7.0
func (options *GetProjectOptions) SetProjectID(projectID string) *GetProjectOptions
SetProjectID : Allow user to set ProjectID
type GetTrainingQueryOptions ¶
type GetTrainingQueryOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The ID of the query used for training.
QueryID *string `json:"query_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
GetTrainingQueryOptions : The GetTrainingQuery options.
func (*GetTrainingQueryOptions) SetHeaders ¶
func (options *GetTrainingQueryOptions) SetHeaders(param map[string]string) *GetTrainingQueryOptions
SetHeaders : Allow user to set Headers
func (*GetTrainingQueryOptions) SetProjectID ¶
func (options *GetTrainingQueryOptions) SetProjectID(projectID string) *GetTrainingQueryOptions
SetProjectID : Allow user to set ProjectID
func (*GetTrainingQueryOptions) SetQueryID ¶
func (options *GetTrainingQueryOptions) SetQueryID(queryID string) *GetTrainingQueryOptions
SetQueryID : Allow user to set QueryID
type ListCollectionsOptions ¶
type ListCollectionsOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
ListCollectionsOptions : The ListCollections options.
func (*ListCollectionsOptions) SetHeaders ¶
func (options *ListCollectionsOptions) SetHeaders(param map[string]string) *ListCollectionsOptions
SetHeaders : Allow user to set Headers
func (*ListCollectionsOptions) SetProjectID ¶
func (options *ListCollectionsOptions) SetProjectID(projectID string) *ListCollectionsOptions
SetProjectID : Allow user to set ProjectID
type ListCollectionsResponse ¶
type ListCollectionsResponse struct {
// An array containing information about each collection in the project.
Collections []Collection `json:"collections,omitempty"`
}
ListCollectionsResponse : Response object containing an array of collection details.
type ListEnrichmentsOptions ¶ added in v1.7.0
type ListEnrichmentsOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
ListEnrichmentsOptions : The ListEnrichments options.
func (*ListEnrichmentsOptions) SetHeaders ¶ added in v1.7.0
func (options *ListEnrichmentsOptions) SetHeaders(param map[string]string) *ListEnrichmentsOptions
SetHeaders : Allow user to set Headers
func (*ListEnrichmentsOptions) SetProjectID ¶ added in v1.7.0
func (options *ListEnrichmentsOptions) SetProjectID(projectID string) *ListEnrichmentsOptions
SetProjectID : Allow user to set ProjectID
type ListFieldsOptions ¶
type ListFieldsOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// Comma separated list of the collection IDs. If this parameter is not specified, all collections in the project are
// used.
CollectionIds []string `json:"collection_ids,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
ListFieldsOptions : The ListFields options.
func (*ListFieldsOptions) SetCollectionIds ¶
func (options *ListFieldsOptions) SetCollectionIds(collectionIds []string) *ListFieldsOptions
SetCollectionIds : Allow user to set CollectionIds
func (*ListFieldsOptions) SetHeaders ¶
func (options *ListFieldsOptions) SetHeaders(param map[string]string) *ListFieldsOptions
SetHeaders : Allow user to set Headers
func (*ListFieldsOptions) SetProjectID ¶
func (options *ListFieldsOptions) SetProjectID(projectID string) *ListFieldsOptions
SetProjectID : Allow user to set ProjectID
type ListFieldsResponse ¶
type ListFieldsResponse struct {
// An array containing information about each field in the collections.
Fields []Field `json:"fields,omitempty"`
}
ListFieldsResponse : The list of fetched fields.
The fields are returned using a fully qualified name format, however, the format differs slightly from that used by the query operations.
Fields which contain nested objects are assigned a type of "nested".
Fields which belong to a nested object are prefixed with `.properties` (for example,
`warnings.properties.severity` means that the `warnings` object has a property called `severity`).
type ListProjectsOptions ¶ added in v1.7.0
type ListProjectsOptions struct {
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
ListProjectsOptions : The ListProjects options.
func (*ListProjectsOptions) SetHeaders ¶ added in v1.7.0
func (options *ListProjectsOptions) SetHeaders(param map[string]string) *ListProjectsOptions
SetHeaders : Allow user to set Headers
type ListProjectsResponse ¶ added in v1.7.0
type ListProjectsResponse struct {
// An array of project details.
Projects []ProjectListDetails `json:"projects,omitempty"`
}
ListProjectsResponse : A list of projects in this instance.
type ListTrainingQueriesOptions ¶
type ListTrainingQueriesOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
ListTrainingQueriesOptions : The ListTrainingQueries options.
func (*ListTrainingQueriesOptions) SetHeaders ¶
func (options *ListTrainingQueriesOptions) SetHeaders(param map[string]string) *ListTrainingQueriesOptions
SetHeaders : Allow user to set Headers
func (*ListTrainingQueriesOptions) SetProjectID ¶
func (options *ListTrainingQueriesOptions) SetProjectID(projectID string) *ListTrainingQueriesOptions
SetProjectID : Allow user to set ProjectID
type Notice ¶
type Notice struct {
// Identifies the notice. Many notices might have the same ID. This field exists so that user applications can
// programmatically identify a notice and take automatic corrective action. Typical notice IDs include: `index_failed`,
// `index_failed_too_many_requests`, `index_failed_incompatible_field`, `index_failed_cluster_unavailable`,
// `ingestion_timeout`, `ingestion_error`, `bad_request`, `internal_error`, `missing_model`, `unsupported_model`,
// `smart_document_understanding_failed_incompatible_field`, `smart_document_understanding_failed_internal_error`,
// `smart_document_understanding_failed_internal_error`, `smart_document_understanding_failed_warning`,
// `smart_document_understanding_page_error`, `smart_document_understanding_page_warning`. **Note:** This is not a
// complete list, other values might be returned.
NoticeID *string `json:"notice_id,omitempty"`
// The creation date of the collection in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'.
Created *strfmt.DateTime `json:"created,omitempty"`
// Unique identifier of the document.
DocumentID *string `json:"document_id,omitempty"`
// Unique identifier of the collection.
CollectionID *string `json:"collection_id,omitempty"`
// Unique identifier of the query used for relevance training.
QueryID *string `json:"query_id,omitempty"`
// Severity level of the notice.
Severity *string `json:"severity,omitempty"`
// Ingestion or training step in which the notice occurred.
Step *string `json:"step,omitempty"`
// The description of the notice.
Description *string `json:"description,omitempty"`
}
Notice : A notice produced for the collection.
type ProjectDetails ¶ added in v1.7.0
type ProjectDetails struct {
// The unique identifier of this project.
ProjectID *string `json:"project_id,omitempty"`
// The human readable name of this project.
Name *string `json:"name,omitempty"`
// The project type of this project.
Type *string `json:"type,omitempty"`
// Relevancy training status information for this project.
RelevancyTrainingStatus *ProjectListDetailsRelevancyTrainingStatus `json:"relevancy_training_status,omitempty"`
// The number of collections configured in this project.
CollectionCount *int64 `json:"collection_count,omitempty"`
// Default query parameters for this project.
DefaultQueryParameters *DefaultQueryParams `json:"default_query_parameters,omitempty"`
}
ProjectDetails : Detailed information about the specified project.
type ProjectListDetails ¶ added in v1.7.0
type ProjectListDetails struct {
// The unique identifier of this project.
ProjectID *string `json:"project_id,omitempty"`
// The human readable name of this project.
Name *string `json:"name,omitempty"`
// The project type of this project.
Type *string `json:"type,omitempty"`
// Relevancy training status information for this project.
RelevancyTrainingStatus *ProjectListDetailsRelevancyTrainingStatus `json:"relevancy_training_status,omitempty"`
// The number of collections configured in this project.
CollectionCount *int64 `json:"collection_count,omitempty"`
}
ProjectListDetails : Details about a specific project.
type ProjectListDetailsRelevancyTrainingStatus ¶ added in v1.7.0
type ProjectListDetailsRelevancyTrainingStatus struct {
// When the training data was updated.
DataUpdated *string `json:"data_updated,omitempty"`
// The total number of examples.
TotalExamples *int64 `json:"total_examples,omitempty"`
// When `true`, sufficent label diversity is present to allow training for this project.
SufficientLabelDiversity *bool `json:"sufficient_label_diversity,omitempty"`
// When `true`, the relevancy training is in processing.
Processing *bool `json:"processing,omitempty"`
// When `true`, the minimum number of examples required to train has been met.
MinimumExamplesAdded *bool `json:"minimum_examples_added,omitempty"`
// The time that the most recent successful training occured.
SuccessfullyTrained *string `json:"successfully_trained,omitempty"`
// When `true`, relevancy training is available when querying collections in the project.
Available *bool `json:"available,omitempty"`
// The number of notices generated during the relevancy training.
Notices *int64 `json:"notices,omitempty"`
// When `true`, the minimum number of queries required to train has been met.
MinimumQueriesAdded *bool `json:"minimum_queries_added,omitempty"`
}
ProjectListDetailsRelevancyTrainingStatus : Relevancy training status information for this project.
type QueryAggregation ¶
type QueryAggregation struct {
// The type of aggregation command used. Options include: term, histogram, timeslice, nested, filter, min, max, sum,
// average, unique_count, and top_hits.
Type *string `json:"type" validate:"required"`
}
QueryAggregation : An abstract aggregation type produced by Discovery to analyze the input provided.
type QueryCalculationAggregation ¶
type QueryCalculationAggregation struct {
// The field to perform the calculation on.
Field *string `json:"field" validate:"required"`
// The value of the calculation.
Value *float64 `json:"value,omitempty"`
}
QueryCalculationAggregation : Returns a scalar calculation across all documents for the field specified. Possible calculations include min, max, sum, average, and unique_count.
type QueryFilterAggregation ¶
type QueryFilterAggregation struct {
// The filter written in Discovery Query Language syntax applied to the documents before sub aggregations are run.
Match *string `json:"match" validate:"required"`
// Number of documents matching the filter.
MatchingResults *int64 `json:"matching_results" validate:"required"`
// An array of sub aggregations.
Aggregations []QueryAggregation `json:"aggregations,omitempty"`
}
QueryFilterAggregation : A modifier that will narrow down the document set of the sub aggregations it precedes.
type QueryGroupByAggregation ¶ added in v1.7.0
type QueryGroupByAggregation struct {
// Array of top values for the field.
Results []QueryGroupByAggregationResult `json:"results,omitempty"`
}
QueryGroupByAggregation : Returns the top values for the field specified.
type QueryGroupByAggregationResult ¶ added in v1.7.0
type QueryGroupByAggregationResult struct {
// Value of the field with a non-zero frequency in the document set.
Key *string `json:"key" validate:"required"`
// Number of documents containing the 'key'.
MatchingResults *int64 `json:"matching_results" validate:"required"`
// The relevancy for this group.
Relevancy *float64 `json:"relevancy,omitempty"`
// The number of documents which have the group as the value of specified field in the whole set of documents in this
// collection. Returned only when the `relevancy` parameter is set to `true`.
TotalMatchingDocuments *int64 `json:"total_matching_documents,omitempty"`
// The estimated number of documents which would match the query and also meet the condition. Returned only when the
// `relevancy` parameter is set to `true`.
EstimatedMatchingDocuments *int64 `json:"estimated_matching_documents,omitempty"`
// An array of sub aggregations.
Aggregations []QueryAggregation `json:"aggregations,omitempty"`
}
QueryGroupByAggregationResult : Top value result for the term aggregation.
type QueryHistogramAggregation ¶
type QueryHistogramAggregation struct {
// The numeric field name used to create the histogram.
Field *string `json:"field" validate:"required"`
// The size of the sections the results are split into.
Interval *int64 `json:"interval" validate:"required"`
// Identifier specified in the query request of this aggregation.
Name *string `json:"name,omitempty"`
// Array of numeric intervals.
Results []QueryHistogramAggregationResult `json:"results,omitempty"`
}
QueryHistogramAggregation : Numeric interval segments to categorize documents by using field values from a single numeric field to describe the category.
type QueryHistogramAggregationResult ¶
type QueryHistogramAggregationResult struct {
// The value of the upper bound for the numeric segment.
Key *int64 `json:"key" validate:"required"`
// Number of documents with the specified key as the upper bound.
MatchingResults *int64 `json:"matching_results" validate:"required"`
// An array of sub aggregations.
Aggregations []QueryAggregation `json:"aggregations,omitempty"`
}
QueryHistogramAggregationResult : Histogram numeric interval result.
type QueryLargePassages ¶
type QueryLargePassages struct {
// A passages query that returns the most relevant passages from the results.
Enabled *bool `json:"enabled,omitempty"`
// When `true`, passages will be returned within their respective result.
PerDocument *bool `json:"per_document,omitempty"`
// Maximum number of passages to return per result.
MaxPerDocument *int64 `json:"max_per_document,omitempty"`
// A list of fields that passages are drawn from. If this parameter not specified, then all top-level fields are
// included.
Fields []string `json:"fields,omitempty"`
// The maximum number of passages to return. The search returns fewer passages if the requested total is not found. The
// maximum is `100`.
Count *int64 `json:"count,omitempty"`
// The approximate number of characters that any one passage will have.
Characters *int64 `json:"characters,omitempty"`
}
QueryLargePassages : Configuration for passage retrieval.
type QueryLargeSuggestedRefinements ¶
type QueryLargeSuggestedRefinements struct {
// Whether to perform suggested refinements.
Enabled *bool `json:"enabled,omitempty"`
// Maximum number of suggested refinements texts to be returned. The maximum is `100`.
Count *int64 `json:"count,omitempty"`
}
QueryLargeSuggestedRefinements : Configuration for suggested refinements.
type QueryLargeTableResults ¶
type QueryLargeTableResults struct {
// Whether to enable table retrieval.
Enabled *bool `json:"enabled,omitempty"`
// Maximum number of tables to return.
Count *int64 `json:"count,omitempty"`
}
QueryLargeTableResults : Configuration for table retrieval.
type QueryNestedAggregation ¶
type QueryNestedAggregation struct {
// The path to the document field to scope sub aggregations to.
Path *string `json:"path" validate:"required"`
// Number of nested documents found in the specified field.
MatchingResults *int64 `json:"matching_results" validate:"required"`
// An array of sub aggregations.
Aggregations []QueryAggregation `json:"aggregations,omitempty"`
}
QueryNestedAggregation : A restriction that alter the document set used for sub aggregations it precedes to nested documents found in the field specified.
type QueryNoticesOptions ¶
type QueryNoticesOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// A 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.
Filter *string `json:"filter,omitempty"`
// A query search returns all documents in your data set with full enrichments and full text, but with the most
// relevant documents listed first.
Query *string `json:"query,omitempty"`
// A natural language query that returns relevant documents by utilizing training data and natural language
// understanding.
NaturalLanguageQuery *string `json:"natural_language_query,omitempty"`
// Number of results to return. The maximum for the **count** and **offset** values together in any one query is
// **10000**.
Count *int64 `json:"count,omitempty"`
// The 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**.
Offset *int64 `json:"offset,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
QueryNoticesOptions : The QueryNotices options.
func (*QueryNoticesOptions) SetCount ¶
func (options *QueryNoticesOptions) SetCount(count int64) *QueryNoticesOptions
SetCount : Allow user to set Count
func (*QueryNoticesOptions) SetFilter ¶
func (options *QueryNoticesOptions) SetFilter(filter string) *QueryNoticesOptions
SetFilter : Allow user to set Filter
func (*QueryNoticesOptions) SetHeaders ¶
func (options *QueryNoticesOptions) SetHeaders(param map[string]string) *QueryNoticesOptions
SetHeaders : Allow user to set Headers
func (*QueryNoticesOptions) SetNaturalLanguageQuery ¶
func (options *QueryNoticesOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *QueryNoticesOptions
SetNaturalLanguageQuery : Allow user to set NaturalLanguageQuery
func (*QueryNoticesOptions) SetOffset ¶
func (options *QueryNoticesOptions) SetOffset(offset int64) *QueryNoticesOptions
SetOffset : Allow user to set Offset
func (*QueryNoticesOptions) SetProjectID ¶
func (options *QueryNoticesOptions) SetProjectID(projectID string) *QueryNoticesOptions
SetProjectID : Allow user to set ProjectID
func (*QueryNoticesOptions) SetQuery ¶
func (options *QueryNoticesOptions) SetQuery(query string) *QueryNoticesOptions
SetQuery : Allow user to set Query
type QueryNoticesResponse ¶
type QueryNoticesResponse struct {
// The number of matching results.
MatchingResults *int64 `json:"matching_results,omitempty"`
// Array of document results that match the query.
Notices []Notice `json:"notices,omitempty"`
}
QueryNoticesResponse : Object containing notice query results.
type QueryOptions ¶
type QueryOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// A comma-separated list of collection IDs to be queried against.
CollectionIds []string `json:"collection_ids,omitempty"`
// A 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.
Filter *string `json:"filter,omitempty"`
// A 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.
Query *string `json:"query,omitempty"`
// A natural language query that returns relevant documents by utilizing training data and natural language
// understanding.
NaturalLanguageQuery *string `json:"natural_language_query,omitempty"`
// An 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.
Aggregation *string `json:"aggregation,omitempty"`
// Number of results to return.
Count *int64 `json:"count,omitempty"`
// A list of the fields in the document hierarchy to return. If this parameter not specified, then all top-level fields
// are returned.
Return []string `json:"return,omitempty"`
// The 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.
Offset *int64 `json:"offset,omitempty"`
// A 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.
Sort *string `json:"sort,omitempty"`
// When `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.
Highlight *bool `json:"highlight,omitempty"`
// When `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).
SpellingSuggestions *bool `json:"spelling_suggestions,omitempty"`
// Configuration for table retrieval.
TableResults *QueryLargeTableResults `json:"table_results,omitempty"`
// Configuration for suggested refinements.
SuggestedRefinements *QueryLargeSuggestedRefinements `json:"suggested_refinements,omitempty"`
// Configuration for passage retrieval.
Passages *QueryLargePassages `json:"passages,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
QueryOptions : The Query options.
func (*QueryOptions) SetAggregation ¶
func (options *QueryOptions) SetAggregation(aggregation string) *QueryOptions
SetAggregation : Allow user to set Aggregation
func (*QueryOptions) SetCollectionIds ¶
func (options *QueryOptions) SetCollectionIds(collectionIds []string) *QueryOptions
SetCollectionIds : Allow user to set CollectionIds
func (*QueryOptions) SetCount ¶
func (options *QueryOptions) SetCount(count int64) *QueryOptions
SetCount : Allow user to set Count
func (*QueryOptions) SetFilter ¶
func (options *QueryOptions) SetFilter(filter string) *QueryOptions
SetFilter : Allow user to set Filter
func (*QueryOptions) SetHeaders ¶
func (options *QueryOptions) SetHeaders(param map[string]string) *QueryOptions
SetHeaders : Allow user to set Headers
func (*QueryOptions) SetHighlight ¶
func (options *QueryOptions) SetHighlight(highlight bool) *QueryOptions
SetHighlight : Allow user to set Highlight
func (*QueryOptions) SetNaturalLanguageQuery ¶
func (options *QueryOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *QueryOptions
SetNaturalLanguageQuery : Allow user to set NaturalLanguageQuery
func (*QueryOptions) SetOffset ¶
func (options *QueryOptions) SetOffset(offset int64) *QueryOptions
SetOffset : Allow user to set Offset
func (*QueryOptions) SetPassages ¶
func (options *QueryOptions) SetPassages(passages *QueryLargePassages) *QueryOptions
SetPassages : Allow user to set Passages
func (*QueryOptions) SetProjectID ¶
func (options *QueryOptions) SetProjectID(projectID string) *QueryOptions
SetProjectID : Allow user to set ProjectID
func (*QueryOptions) SetQuery ¶
func (options *QueryOptions) SetQuery(query string) *QueryOptions
SetQuery : Allow user to set Query
func (*QueryOptions) SetReturn ¶
func (options *QueryOptions) SetReturn(returnVar []string) *QueryOptions
SetReturn : Allow user to set Return
func (*QueryOptions) SetSort ¶
func (options *QueryOptions) SetSort(sort string) *QueryOptions
SetSort : Allow user to set Sort
func (*QueryOptions) SetSpellingSuggestions ¶
func (options *QueryOptions) SetSpellingSuggestions(spellingSuggestions bool) *QueryOptions
SetSpellingSuggestions : Allow user to set SpellingSuggestions
func (*QueryOptions) SetSuggestedRefinements ¶
func (options *QueryOptions) SetSuggestedRefinements(suggestedRefinements *QueryLargeSuggestedRefinements) *QueryOptions
SetSuggestedRefinements : Allow user to set SuggestedRefinements
func (*QueryOptions) SetTableResults ¶
func (options *QueryOptions) SetTableResults(tableResults *QueryLargeTableResults) *QueryOptions
SetTableResults : Allow user to set TableResults
type QueryResponse ¶
type QueryResponse struct {
// The number of matching results for the query.
MatchingResults *int64 `json:"matching_results,omitempty"`
// Array of document results for the query.
Results []QueryResult `json:"results,omitempty"`
// Array of aggregations for the query.
Aggregations []QueryAggregation `json:"aggregations,omitempty"`
// An object contain retrieval type information.
RetrievalDetails *RetrievalDetails `json:"retrieval_details,omitempty"`
// Suggested correction to the submitted **natural_language_query** value.
SuggestedQuery *string `json:"suggested_query,omitempty"`
// Array of suggested refinements.
SuggestedRefinements []QuerySuggestedRefinement `json:"suggested_refinements,omitempty"`
// Array of table results.
TableResults []QueryTableResult `json:"table_results,omitempty"`
}
QueryResponse : A response containing the documents and aggregations for the query.
type QueryResult ¶
type QueryResult map[string]interface{}
QueryResult : Result document for the specified query.
func (*QueryResult) GetDocumentID ¶
func (this *QueryResult) GetDocumentID() *string
GetDocumentID : Allow user to get DocumentID
func (*QueryResult) GetDocumentPassages ¶
func (this *QueryResult) GetDocumentPassages() *[]QueryResultPassage
GetDocumentPassages : Allow user to get DocumentPassages
func (*QueryResult) GetMetadata ¶
func (this *QueryResult) GetMetadata() *map[string]interface{}
GetMetadata : Allow user to get Metadata
func (*QueryResult) GetProperty ¶
func (this *QueryResult) GetProperty(Key string) *interface{}
GetProperty : Allow user to get arbitrary property
func (*QueryResult) GetResultMetadata ¶
func (this *QueryResult) GetResultMetadata() *QueryResultMetadata
GetResultMetadata : Allow user to get ResultMetadata
func (*QueryResult) SetDocumentID ¶
func (this *QueryResult) SetDocumentID(DocumentID *string)
SetDocumentID : Allow user to set DocumentID
func (*QueryResult) SetDocumentPassages ¶
func (this *QueryResult) SetDocumentPassages(DocumentPassages *[]QueryResultPassage)
SetDocumentPassages : Allow user to set DocumentPassages
func (*QueryResult) SetMetadata ¶
func (this *QueryResult) SetMetadata(Metadata *map[string]interface{})
SetMetadata : Allow user to set Metadata
func (*QueryResult) SetProperty ¶
func (this *QueryResult) SetProperty(Key string, Value *interface{})
SetProperty : Allow user to set arbitrary property
func (*QueryResult) SetResultMetadata ¶
func (this *QueryResult) SetResultMetadata(ResultMetadata *QueryResultMetadata)
SetResultMetadata : Allow user to set ResultMetadata
type QueryResultMetadata ¶
type QueryResultMetadata struct {
// The document retrieval source that produced this search result.
DocumentRetrievalSource *string `json:"document_retrieval_source,omitempty"`
// The collection id associated with this training data set.
CollectionID *string `json:"collection_id" validate:"required"`
// The confidence score for the given result. Calculated based on how relevant the result is estimated to be.
// confidence can range from `0.0` to `1.0`. The higher the number, the more relevant the document. The `confidence`
// value for a result was calculated using the model specified in the `document_retrieval_strategy` field of the result
// set. This field is only returned if the **natural_language_query** parameter is specified in the query.
Confidence *float64 `json:"confidence,omitempty"`
}
QueryResultMetadata : Metadata of a query result.
type QueryResultPassage ¶
type QueryResultPassage struct {
// The content of the extracted passage.
PassageText *string `json:"passage_text,omitempty"`
// The position of the first character of the extracted passage in the originating field.
StartOffset *int64 `json:"start_offset,omitempty"`
// The position of the last character of the extracted passage in the originating field.
EndOffset *int64 `json:"end_offset,omitempty"`
// The label of the field from which the passage has been extracted.
Field *string `json:"field,omitempty"`
}
QueryResultPassage : A passage query result.
type QuerySuggestedRefinement ¶
type QuerySuggestedRefinement struct {
// The text used to filter.
Text *string `json:"text,omitempty"`
}
QuerySuggestedRefinement : A suggested additional query term or terms user to filter results.
type QueryTableResult ¶
type QueryTableResult struct {
// The identifier for the retrieved table.
TableID *string `json:"table_id,omitempty"`
// The identifier of the document the table was retrieved from.
SourceDocumentID *string `json:"source_document_id,omitempty"`
// The identifier of the collection the table was retrieved from.
CollectionID *string `json:"collection_id,omitempty"`
// HTML snippet of the table info.
TableHTML *string `json:"table_html,omitempty"`
// The offset of the table html snippet in the original document html.
TableHTMLOffset *int64 `json:"table_html_offset,omitempty"`
// Full table object retrieved from Table Understanding Enrichment.
Table *TableResultTable `json:"table,omitempty"`
}
QueryTableResult : A tables whose content or context match a search query.
type QueryTermAggregation ¶
type QueryTermAggregation struct {
// The field in the document used to generate top values from.
Field *string `json:"field" validate:"required"`
// The number of top values returned.
Count *int64 `json:"count,omitempty"`
// Identifier specified in the query request of this aggregation.
Name *string `json:"name,omitempty"`
// Array of top values for the field.
Results []QueryTermAggregationResult `json:"results,omitempty"`
}
QueryTermAggregation : Returns the top values for the field specified.
type QueryTermAggregationResult ¶
type QueryTermAggregationResult struct {
// Value of the field with a non-zero frequency in the document set.
Key *string `json:"key" validate:"required"`
// Number of documents containing the 'key'.
MatchingResults *int64 `json:"matching_results" validate:"required"`
// The relevancy for this term.
Relevancy *float64 `json:"relevancy,omitempty"`
// The number of documents which have the term as the value of specified field in the whole set of documents in this
// collection. Returned only when the `relevancy` parameter is set to `true`.
TotalMatchingDocuments *int64 `json:"total_matching_documents,omitempty"`
// The estimated number of documents which would match the query and also meet the condition. Returned only when the
// `relevancy` parameter is set to `true`.
EstimatedMatchingDocuments *int64 `json:"estimated_matching_documents,omitempty"`
// An array of sub aggregations.
Aggregations []QueryAggregation `json:"aggregations,omitempty"`
}
QueryTermAggregationResult : Top value result for the term aggregation.
type QueryTimesliceAggregation ¶
type QueryTimesliceAggregation struct {
// The date field name used to create the timeslice.
Field *string `json:"field" validate:"required"`
// The date interval value. Valid values are seconds, minutes, hours, days, weeks, and years.
Interval *string `json:"interval" validate:"required"`
// Identifier specified in the query request of this aggregation.
Name *string `json:"name,omitempty"`
// Array of aggregation results.
Results []QueryTimesliceAggregationResult `json:"results,omitempty"`
}
QueryTimesliceAggregation : A specialized histogram aggregation that uses dates to create interval segments.
type QueryTimesliceAggregationResult ¶
type QueryTimesliceAggregationResult struct {
// String date value of the upper bound for the timeslice interval in ISO-8601 format.
KeyAsString *string `json:"key_as_string" validate:"required"`
// Numeric date value of the upper bound for the timeslice interval in UNIX milliseconds since epoch.
Key *int64 `json:"key" validate:"required"`
// Number of documents with the specified key as the upper bound.
MatchingResults *int64 `json:"matching_results" validate:"required"`
// An array of sub aggregations.
Aggregations []QueryAggregation `json:"aggregations,omitempty"`
}
QueryTimesliceAggregationResult : A timeslice interval segment.
type QueryTopHitsAggregation ¶
type QueryTopHitsAggregation struct {
// The number of documents to return.
Size *int64 `json:"size" validate:"required"`
// Identifier specified in the query request of this aggregation.
Name *string `json:"name,omitempty"`
Hits *QueryTopHitsAggregationResult `json:"hits,omitempty"`
}
QueryTopHitsAggregation : Returns the top documents ranked by the score of the query.
type QueryTopHitsAggregationResult ¶
type QueryTopHitsAggregationResult struct {
// Number of matching results.
MatchingResults *int64 `json:"matching_results" validate:"required"`
// An array of the document results.
Hits []map[string]interface{} `json:"hits,omitempty"`
}
QueryTopHitsAggregationResult : A query response containing the matching documents for the preceding aggregations.
type RetrievalDetails ¶
type RetrievalDetails struct {
// Identifies the document retrieval strategy used for this query. `relevancy_training` indicates that the results were
// returned using a relevancy trained model.
//
// **Note**: In the event of trained collections being queried, but the trained model is not used to return results,
// the **document_retrieval_strategy** will be listed as `untrained`.
DocumentRetrievalStrategy *string `json:"document_retrieval_strategy,omitempty"`
}
RetrievalDetails : An object contain retrieval type information.
type TableBodyCells ¶
type TableBodyCells struct {
// The unique ID of the cell in the current table.
CellID *string `json:"cell_id,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *TableElementLocation `json:"location,omitempty"`
// The textual contents of this cell from the input document without associated markup content.
Text *string `json:"text,omitempty"`
// The `begin` index of this cell's `row` location in the current table.
RowIndexBegin *int64 `json:"row_index_begin,omitempty"`
// The `end` index of this cell's `row` location in the current table.
RowIndexEnd *int64 `json:"row_index_end,omitempty"`
// The `begin` index of this cell's `column` location in the current table.
ColumnIndexBegin *int64 `json:"column_index_begin,omitempty"`
// The `end` index of this cell's `column` location in the current table.
ColumnIndexEnd *int64 `json:"column_index_end,omitempty"`
// A list of table row header ids.
RowHeaderIds []TableRowHeaderIds `json:"row_header_ids,omitempty"`
// A list of table row header texts.
RowHeaderTexts []TableRowHeaderTexts `json:"row_header_texts,omitempty"`
// A list of table row header texts normalized.
RowHeaderTextsNormalized []TableRowHeaderTextsNormalized `json:"row_header_texts_normalized,omitempty"`
// A list of table column header ids.
ColumnHeaderIds []TableColumnHeaderIds `json:"column_header_ids,omitempty"`
// A list of table column header texts.
ColumnHeaderTexts []TableColumnHeaderTexts `json:"column_header_texts,omitempty"`
// A list of table column header texts normalized.
ColumnHeaderTextsNormalized []TableColumnHeaderTextsNormalized `json:"column_header_texts_normalized,omitempty"`
// A list of document attributes.
Attributes []DocumentAttribute `json:"attributes,omitempty"`
}
TableBodyCells : Cells that are not table header, column header, or row header cells.
type TableCellKey ¶
type TableCellKey struct {
// The unique ID of the key in the table.
CellID *string `json:"cell_id,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *TableElementLocation `json:"location,omitempty"`
// The text content of the table cell without HTML markup.
Text *string `json:"text,omitempty"`
}
TableCellKey : A key in a key-value pair.
type TableCellValues ¶
type TableCellValues struct {
// The unique ID of the value in the table.
CellID *string `json:"cell_id,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *TableElementLocation `json:"location,omitempty"`
// The text content of the table cell without HTML markup.
Text *string `json:"text,omitempty"`
}
TableCellValues : A value in a key-value pair.
type TableColumnHeaderIds ¶
type TableColumnHeaderIds struct {
// The `id` value of a column header.
ID *string `json:"id,omitempty"`
}
TableColumnHeaderIds : An array of values, each being the `id` value of a column header that is applicable to the current cell.
type TableColumnHeaderTexts ¶
type TableColumnHeaderTexts struct {
// The `text` value of a column header.
Text *string `json:"text,omitempty"`
}
TableColumnHeaderTexts : An array of values, each being the `text` value of a column header that is applicable to the current cell.
type TableColumnHeaderTextsNormalized ¶
type TableColumnHeaderTextsNormalized struct {
// The normalized version of a column header text.
TextNormalized *string `json:"text_normalized,omitempty"`
}
TableColumnHeaderTextsNormalized : If you provide customization input, the normalized version of the column header texts according to the customization; otherwise, the same value as `column_header_texts`.
type TableColumnHeaders ¶
type TableColumnHeaders struct {
// The unique ID of the cell in the current table.
CellID *string `json:"cell_id,omitempty"`
// The location of the column header cell in the current table as defined by its `begin` and `end` offsets,
// respectfully, in the input document.
Location interface{} `json:"location,omitempty"`
// The textual contents of this cell from the input document without associated markup content.
Text *string `json:"text,omitempty"`
// If you provide customization input, the normalized version of the cell text according to the customization;
// otherwise, the same value as `text`.
TextNormalized *string `json:"text_normalized,omitempty"`
// The `begin` index of this cell's `row` location in the current table.
RowIndexBegin *int64 `json:"row_index_begin,omitempty"`
// The `end` index of this cell's `row` location in the current table.
RowIndexEnd *int64 `json:"row_index_end,omitempty"`
// The `begin` index of this cell's `column` location in the current table.
ColumnIndexBegin *int64 `json:"column_index_begin,omitempty"`
// The `end` index of this cell's `column` location in the current table.
ColumnIndexEnd *int64 `json:"column_index_end,omitempty"`
}
TableColumnHeaders : Column-level cells, each applicable as a header to other cells in the same column as itself, of the current table.
type TableElementLocation ¶
type TableElementLocation struct {
// The element's `begin` index.
Begin *int64 `json:"begin" validate:"required"`
// The element's `end` index.
End *int64 `json:"end" validate:"required"`
}
TableElementLocation : The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`.
type TableHeaders ¶
type TableHeaders struct {
// The unique ID of the cell in the current table.
CellID *string `json:"cell_id,omitempty"`
// The location of the table header cell in the current table as defined by its `begin` and `end` offsets,
// respectfully, in the input document.
Location interface{} `json:"location,omitempty"`
// The textual contents of the cell from the input document without associated markup content.
Text *string `json:"text,omitempty"`
// The `begin` index of this cell's `row` location in the current table.
RowIndexBegin *int64 `json:"row_index_begin,omitempty"`
// The `end` index of this cell's `row` location in the current table.
RowIndexEnd *int64 `json:"row_index_end,omitempty"`
// The `begin` index of this cell's `column` location in the current table.
ColumnIndexBegin *int64 `json:"column_index_begin,omitempty"`
// The `end` index of this cell's `column` location in the current table.
ColumnIndexEnd *int64 `json:"column_index_end,omitempty"`
}
TableHeaders : The contents of the current table's header.
type TableKeyValuePairs ¶
type TableKeyValuePairs struct {
// A key in a key-value pair.
Key *TableCellKey `json:"key,omitempty"`
// A list of values in a key-value pair.
Value []TableCellValues `json:"value,omitempty"`
}
TableKeyValuePairs : Key-value pairs detected across cell boundaries.
type TableResultTable ¶
type TableResultTable struct {
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *TableElementLocation `json:"location,omitempty"`
// The textual contents of the current table from the input document without associated markup content.
Text *string `json:"text,omitempty"`
// Text and associated location within a table.
SectionTitle *TableTextLocation `json:"section_title,omitempty"`
// Text and associated location within a table.
Title *TableTextLocation `json:"title,omitempty"`
// An array of table-level cells that apply as headers to all the other cells in the current table.
TableHeaders []TableHeaders `json:"table_headers,omitempty"`
// An array of row-level cells, each applicable as a header to other cells in the same row as itself, of the current
// table.
RowHeaders []TableRowHeaders `json:"row_headers,omitempty"`
// An array of column-level cells, each applicable as a header to other cells in the same column as itself, of the
// current table.
ColumnHeaders []TableColumnHeaders `json:"column_headers,omitempty"`
// An array of key-value pairs identified in the current table.
KeyValuePairs []TableKeyValuePairs `json:"key_value_pairs,omitempty"`
// An array of cells that are neither table header nor column header nor row header cells, of the current table with
// corresponding row and column header associations.
BodyCells []TableBodyCells `json:"body_cells,omitempty"`
// An array of lists of textual entries across the document related to the current table being parsed.
Contexts []TableTextLocation `json:"contexts,omitempty"`
}
TableResultTable : Full table object retrieved from Table Understanding Enrichment.
type TableRowHeaderIds ¶
type TableRowHeaderIds struct {
// The `id` values of a row header.
ID *string `json:"id,omitempty"`
}
TableRowHeaderIds : An array of values, each being the `id` value of a row header that is applicable to this body cell.
type TableRowHeaderTexts ¶
type TableRowHeaderTexts struct {
// The `text` value of a row header.
Text *string `json:"text,omitempty"`
}
TableRowHeaderTexts : An array of values, each being the `text` value of a row header that is applicable to this body cell.
type TableRowHeaderTextsNormalized ¶
type TableRowHeaderTextsNormalized struct {
// The normalized version of a row header text.
TextNormalized *string `json:"text_normalized,omitempty"`
}
TableRowHeaderTextsNormalized : If you provide customization input, the normalized version of the row header texts according to the customization; otherwise, the same value as `row_header_texts`.
type TableRowHeaders ¶
type TableRowHeaders struct {
// The unique ID of the cell in the current table.
CellID *string `json:"cell_id,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *TableElementLocation `json:"location,omitempty"`
// The textual contents of this cell from the input document without associated markup content.
Text *string `json:"text,omitempty"`
// If you provide customization input, the normalized version of the cell text according to the customization;
// otherwise, the same value as `text`.
TextNormalized *string `json:"text_normalized,omitempty"`
// The `begin` index of this cell's `row` location in the current table.
RowIndexBegin *int64 `json:"row_index_begin,omitempty"`
// The `end` index of this cell's `row` location in the current table.
RowIndexEnd *int64 `json:"row_index_end,omitempty"`
// The `begin` index of this cell's `column` location in the current table.
ColumnIndexBegin *int64 `json:"column_index_begin,omitempty"`
// The `end` index of this cell's `column` location in the current table.
ColumnIndexEnd *int64 `json:"column_index_end,omitempty"`
}
TableRowHeaders : Row-level cells, each applicable as a header to other cells in the same row as itself, of the current table.
type TableTextLocation ¶
type TableTextLocation struct {
// The text retrieved.
Text *string `json:"text,omitempty"`
// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
// `end`.
Location *TableElementLocation `json:"location,omitempty"`
}
TableTextLocation : Text and associated location within a table.
type TrainingExample ¶
type TrainingExample struct {
// The document ID associated with this training example.
DocumentID *string `json:"document_id" validate:"required"`
// The collection ID associated with this training example.
CollectionID *string `json:"collection_id" validate:"required"`
// The relevance of the training example.
Relevance *int64 `json:"relevance" validate:"required"`
// The date and time the example was created.
Created *strfmt.DateTime `json:"created,omitempty"`
// The date and time the example was updated.
Updated *strfmt.DateTime `json:"updated,omitempty"`
}
TrainingExample : Object containing example response details for a training query.
type TrainingQuery ¶
type TrainingQuery struct {
// The query ID associated with the training query.
QueryID *string `json:"query_id,omitempty"`
// The natural text query for the training query.
NaturalLanguageQuery *string `json:"natural_language_query" validate:"required"`
// The filter used on the collection before the **natural_language_query** is applied.
Filter *string `json:"filter,omitempty"`
// The date and time the query was created.
Created *strfmt.DateTime `json:"created,omitempty"`
// The date and time the query was updated.
Updated *strfmt.DateTime `json:"updated,omitempty"`
// Array of training examples.
Examples []TrainingExample `json:"examples" validate:"required"`
}
TrainingQuery : Object containing training query details.
type TrainingQuerySet ¶
type TrainingQuerySet struct {
// Array of training queries.
Queries []TrainingQuery `json:"queries,omitempty"`
}
TrainingQuerySet : Object specifying the training queries contained in the identified training set.
type UpdateCollectionOptions ¶ added in v1.7.0
type UpdateCollectionOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The ID of the collection.
CollectionID *string `json:"collection_id" validate:"required"`
// The name of the collection.
Name *string `json:"name,omitempty"`
// A description of the collection.
Description *string `json:"description,omitempty"`
// An array of enrichments that are applied to this collection.
Enrichments []CollectionEnrichment `json:"enrichments,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
UpdateCollectionOptions : The UpdateCollection options.
func (*UpdateCollectionOptions) SetCollectionID ¶ added in v1.7.0
func (options *UpdateCollectionOptions) SetCollectionID(collectionID string) *UpdateCollectionOptions
SetCollectionID : Allow user to set CollectionID
func (*UpdateCollectionOptions) SetDescription ¶ added in v1.7.0
func (options *UpdateCollectionOptions) SetDescription(description string) *UpdateCollectionOptions
SetDescription : Allow user to set Description
func (*UpdateCollectionOptions) SetEnrichments ¶ added in v1.7.0
func (options *UpdateCollectionOptions) SetEnrichments(enrichments []CollectionEnrichment) *UpdateCollectionOptions
SetEnrichments : Allow user to set Enrichments
func (*UpdateCollectionOptions) SetHeaders ¶ added in v1.7.0
func (options *UpdateCollectionOptions) SetHeaders(param map[string]string) *UpdateCollectionOptions
SetHeaders : Allow user to set Headers
func (*UpdateCollectionOptions) SetName ¶ added in v1.7.0
func (options *UpdateCollectionOptions) SetName(name string) *UpdateCollectionOptions
SetName : Allow user to set Name
func (*UpdateCollectionOptions) SetProjectID ¶ added in v1.7.0
func (options *UpdateCollectionOptions) SetProjectID(projectID string) *UpdateCollectionOptions
SetProjectID : Allow user to set ProjectID
type UpdateDocumentOptions ¶
type UpdateDocumentOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The ID of the collection.
CollectionID *string `json:"collection_id" validate:"required"`
// The ID of the document.
DocumentID *string `json:"document_id" validate:"required"`
// The 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.
File io.ReadCloser `json:"file,omitempty"`
// The filename for file.
Filename *string `json:"filename,omitempty"`
// The content type of file.
FileContentType *string `json:"file_content_type,omitempty"`
// The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected.
//
//
// Example: “` {
// "Creator": "Johnny Appleseed",
// "Subject": "Apples"
// } “`.
Metadata *string `json:"metadata,omitempty"`
// When `true`, the uploaded document is added to the collection even if the data for that collection is shared with
// other collections.
XWatsonDiscoveryForce *bool `json:"X-Watson-Discovery-Force,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
UpdateDocumentOptions : The UpdateDocument options.
func (*UpdateDocumentOptions) SetCollectionID ¶
func (options *UpdateDocumentOptions) SetCollectionID(collectionID string) *UpdateDocumentOptions
SetCollectionID : Allow user to set CollectionID
func (*UpdateDocumentOptions) SetDocumentID ¶
func (options *UpdateDocumentOptions) SetDocumentID(documentID string) *UpdateDocumentOptions
SetDocumentID : Allow user to set DocumentID
func (*UpdateDocumentOptions) SetFile ¶
func (options *UpdateDocumentOptions) SetFile(file io.ReadCloser) *UpdateDocumentOptions
SetFile : Allow user to set File
func (*UpdateDocumentOptions) SetFileContentType ¶
func (options *UpdateDocumentOptions) SetFileContentType(fileContentType string) *UpdateDocumentOptions
SetFileContentType : Allow user to set FileContentType
func (*UpdateDocumentOptions) SetFilename ¶
func (options *UpdateDocumentOptions) SetFilename(filename string) *UpdateDocumentOptions
SetFilename : Allow user to set Filename
func (*UpdateDocumentOptions) SetHeaders ¶
func (options *UpdateDocumentOptions) SetHeaders(param map[string]string) *UpdateDocumentOptions
SetHeaders : Allow user to set Headers
func (*UpdateDocumentOptions) SetMetadata ¶
func (options *UpdateDocumentOptions) SetMetadata(metadata string) *UpdateDocumentOptions
SetMetadata : Allow user to set Metadata
func (*UpdateDocumentOptions) SetProjectID ¶
func (options *UpdateDocumentOptions) SetProjectID(projectID string) *UpdateDocumentOptions
SetProjectID : Allow user to set ProjectID
func (*UpdateDocumentOptions) SetXWatsonDiscoveryForce ¶
func (options *UpdateDocumentOptions) SetXWatsonDiscoveryForce(xWatsonDiscoveryForce bool) *UpdateDocumentOptions
SetXWatsonDiscoveryForce : Allow user to set XWatsonDiscoveryForce
type UpdateEnrichmentOptions ¶ added in v1.7.0
type UpdateEnrichmentOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The ID of the enrichment.
EnrichmentID *string `json:"enrichment_id" validate:"required"`
// A new name for the enrichment.
Name *string `json:"name" validate:"required"`
// A new description for the enrichment.
Description *string `json:"description,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
UpdateEnrichmentOptions : The UpdateEnrichment options.
func (*UpdateEnrichmentOptions) SetDescription ¶ added in v1.7.0
func (options *UpdateEnrichmentOptions) SetDescription(description string) *UpdateEnrichmentOptions
SetDescription : Allow user to set Description
func (*UpdateEnrichmentOptions) SetEnrichmentID ¶ added in v1.7.0
func (options *UpdateEnrichmentOptions) SetEnrichmentID(enrichmentID string) *UpdateEnrichmentOptions
SetEnrichmentID : Allow user to set EnrichmentID
func (*UpdateEnrichmentOptions) SetHeaders ¶ added in v1.7.0
func (options *UpdateEnrichmentOptions) SetHeaders(param map[string]string) *UpdateEnrichmentOptions
SetHeaders : Allow user to set Headers
func (*UpdateEnrichmentOptions) SetName ¶ added in v1.7.0
func (options *UpdateEnrichmentOptions) SetName(name string) *UpdateEnrichmentOptions
SetName : Allow user to set Name
func (*UpdateEnrichmentOptions) SetProjectID ¶ added in v1.7.0
func (options *UpdateEnrichmentOptions) SetProjectID(projectID string) *UpdateEnrichmentOptions
SetProjectID : Allow user to set ProjectID
type UpdateProjectOptions ¶ added in v1.7.0
type UpdateProjectOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The new name to give this project.
Name *string `json:"name,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
UpdateProjectOptions : The UpdateProject options.
func (*UpdateProjectOptions) SetHeaders ¶ added in v1.7.0
func (options *UpdateProjectOptions) SetHeaders(param map[string]string) *UpdateProjectOptions
SetHeaders : Allow user to set Headers
func (*UpdateProjectOptions) SetName ¶ added in v1.7.0
func (options *UpdateProjectOptions) SetName(name string) *UpdateProjectOptions
SetName : Allow user to set Name
func (*UpdateProjectOptions) SetProjectID ¶ added in v1.7.0
func (options *UpdateProjectOptions) SetProjectID(projectID string) *UpdateProjectOptions
SetProjectID : Allow user to set ProjectID
type UpdateTrainingQueryOptions ¶
type UpdateTrainingQueryOptions struct {
// The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling.
ProjectID *string `json:"project_id" validate:"required"`
// The ID of the query used for training.
QueryID *string `json:"query_id" validate:"required"`
// The natural text query for the training query.
NaturalLanguageQuery *string `json:"natural_language_query" validate:"required"`
// Array of training examples.
Examples []TrainingExample `json:"examples" validate:"required"`
// The filter used on the collection before the **natural_language_query** is applied.
Filter *string `json:"filter,omitempty"`
// Allows users to set headers to be GDPR compliant
Headers map[string]string
}
UpdateTrainingQueryOptions : The UpdateTrainingQuery options.
func (*UpdateTrainingQueryOptions) SetExamples ¶
func (options *UpdateTrainingQueryOptions) SetExamples(examples []TrainingExample) *UpdateTrainingQueryOptions
SetExamples : Allow user to set Examples
func (*UpdateTrainingQueryOptions) SetFilter ¶
func (options *UpdateTrainingQueryOptions) SetFilter(filter string) *UpdateTrainingQueryOptions
SetFilter : Allow user to set Filter
func (*UpdateTrainingQueryOptions) SetHeaders ¶
func (options *UpdateTrainingQueryOptions) SetHeaders(param map[string]string) *UpdateTrainingQueryOptions
SetHeaders : Allow user to set Headers
func (*UpdateTrainingQueryOptions) SetNaturalLanguageQuery ¶
func (options *UpdateTrainingQueryOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *UpdateTrainingQueryOptions
SetNaturalLanguageQuery : Allow user to set NaturalLanguageQuery
func (*UpdateTrainingQueryOptions) SetProjectID ¶
func (options *UpdateTrainingQueryOptions) SetProjectID(projectID string) *UpdateTrainingQueryOptions
SetProjectID : Allow user to set ProjectID
func (*UpdateTrainingQueryOptions) SetQueryID ¶
func (options *UpdateTrainingQueryOptions) SetQueryID(queryID string) *UpdateTrainingQueryOptions
SetQueryID : Allow user to set QueryID