Documentation
¶
Index ¶
- type ContentItemLegacy
- type CountValue
- type CreateIndexResponse
- type DescriptionLegacy
- type ESBucket
- type ESBucketLegacy
- type ESDimensions
- type ESDocCounts
- type ESHighlight
- type ESHighlightLegacy
- type ESPopulationType
- type ESResponseAggregations
- type ESResponseAggregationsLegacy
- type ESResponseHit
- type ESResponseHitLegacy
- type ESResponseHits
- type ESResponseHitsLegacy
- type ESResponseItemLegacy
- type ESResponseLegacy
- type ESSearchSuggestLegacy
- type ESSearchSuggestOptionsLegacy
- type ESSourceDocument
- type ESSourceDocumentLegacy
- type ESSuggestLegacy
- type EsResponse
- type EsResponses
- type FilterCount
- type HighlightObj
- type HighlightObjLegacy
- type Item
- type Option
- type ReleaseDateChange
- type SearchResponse
- type SearchResponseLegacy
- type SearchSuggest
- type Suggest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentItemLegacy ¶
type ContentItemLegacy struct {
Description DescriptionLegacy `json:"description"`
Type string `json:"type"`
URI string `json:"uri"`
}
type CountValue ¶ added in v1.30.0
type CountValue struct {
Value int `json:"value"`
}
type CreateIndexResponse ¶ added in v1.29.0
type CreateIndexResponse struct {
IndexName string `json:"index_name"`
}
type DescriptionLegacy ¶
type DescriptionLegacy struct {
Contact *contactLegacy `json:"contact,omitempty"`
DatasetID string `json:"dataset_id,omitempty"`
Edition string `json:"edition,omitempty"`
Headline1 string `json:"headline1,omitempty"`
Headline2 string `json:"headline2,omitempty"`
Headline3 string `json:"headline3,omitempty"`
Highlight *HighlightObjLegacy `json:"highlight,omitempty"`
Keywords []*string `json:"keywords,omitempty"`
LatestRelease *bool `json:"latest_release,omitempty"`
Language string `json:"language,omitempty"`
MetaDescription string `json:"meta_description,omitempty"`
NationalStatistic *bool `json:"national_statistic,omitempty"`
NextRelease string `json:"next_release,omitempty"`
PreUnit string `json:"pre_unit,omitempty"`
ReleaseDate string `json:"release_date,omitempty"`
Source string `json:"source,omitempty"`
Summary string `json:"summary"`
Title string `json:"title"`
Unit string `json:"unit,omitempty"`
}
type ESBucketLegacy ¶
type ESDimensions ¶ added in v1.33.0
type ESDocCounts ¶
type ESDocCounts struct {
Buckets []ESBucket `json:"buckets"`
}
type ESHighlight ¶
type ESHighlightLegacy ¶
type ESHighlightLegacy struct {
DescriptionTitle []*string `json:"description.title"`
DescriptionEdition []*string `json:"description.edition"`
DescriptionSummary []*string `json:"description.summary"`
DescriptionMeta []*string `json:"description.metaDescription"`
DescriptionKeywords []*string `json:"description.keywords"`
DescriptionDatasetID []*string `json:"description.datasetId"`
}
type ESPopulationType ¶ added in v1.33.0
type ESResponseAggregations ¶
type ESResponseAggregations struct {
ContentTypes ESDocCounts `json:"content_types"`
Topic ESDocCounts `json:"topic"`
PopulationType ESDocCounts `json:"population_type"`
Dimensions ESDocCounts `json:"dimensions"`
DistinctTopicCount CountValue `json:"distinct_topics_count"`
}
type ESResponseAggregationsLegacy ¶
type ESResponseAggregationsLegacy struct {
DocCounts struct {
Buckets []ESBucketLegacy `json:"buckets"`
} `json:"docCounts"`
}
type ESResponseHit ¶
type ESResponseHit struct {
Source ESSourceDocument `json:"_source"`
Highlight *ESHighlight `json:"highlight"`
}
type ESResponseHitLegacy ¶
type ESResponseHitLegacy struct {
Source ESSourceDocumentLegacy `json:"_source"`
Highlight ESHighlightLegacy `json:"highlight"`
}
type ESResponseHits ¶
type ESResponseHits struct {
Total int
Hits []ESResponseHit `json:"hits"`
}
type ESResponseHitsLegacy ¶
type ESResponseHitsLegacy struct {
Total int
Hits []ESResponseHitLegacy `json:"hits"`
}
type ESResponseItemLegacy ¶
type ESResponseItemLegacy struct {
Took int `json:"took"`
Hits ESResponseHitsLegacy `json:"hits"`
Aggregations ESResponseAggregationsLegacy `json:"aggregations"`
Suggest ESSuggestLegacy `json:"suggest"`
}
type ESResponseLegacy ¶
type ESResponseLegacy struct {
Responses []ESResponseItemLegacy `json:"responses"`
}
type ESSearchSuggestLegacy ¶
type ESSearchSuggestLegacy struct {
Options []ESSearchSuggestOptionsLegacy `json:"options"`
}
type ESSearchSuggestOptionsLegacy ¶
type ESSearchSuggestOptionsLegacy struct {
Text string `json:"text"`
}
type ESSourceDocument ¶
type ESSourceDocument struct {
DataType string `json:"type"`
CDID string `json:"cdid"`
DatasetID string `json:"dataset_id"`
Edition string `json:"edition"`
Keywords []string `json:"keywords"`
MetaDescription string `json:"meta_description"`
ReleaseDate string `json:"release_date,omitempty"`
Summary string `json:"summary"`
Title string `json:"title"`
Topics []string `json:"topics"`
URI string `json:"uri"`
Highlight *HighlightObj `json:"highlight,omitempty"`
DateChanges []ReleaseDateChange `json:"date_changes,omitempty"`
Cancelled bool `json:"cancelled,omitempty"`
CanonicalTopic string `json:"canonical_topic"`
Finalised bool `json:"finalised,omitempty"`
ProvisionalDate string `json:"provisional_date,omitempty"`
Published bool `json:"published,omitempty"`
Language string `json:"language,omitempty"`
Survey string `json:"survey,omitempty"`
PopulationType ESPopulationType `json:"population_type,omitempty"`
Dimensions []ESDimensions `json:"dimensions,omitempty"`
}
type ESSourceDocumentLegacy ¶
type ESSourceDocumentLegacy struct {
Description struct {
Summary string `json:"summary"`
NextRelease string `json:"nextRelease,omitempty"`
Unit string `json:"unit,omitempty"`
Keywords []*string `json:"keywords,omitempty"`
ReleaseDate string `json:"releaseDate,omitempty"`
Edition string `json:"edition,omitempty"`
LatestRelease *bool `json:"latestRelease,omitempty"`
Language string `json:"language,omitempty"`
Contact *contactLegacy `json:"contact,omitempty"`
DatasetID string `json:"datasetId,omitempty"`
Source string `json:"source,omitempty"`
Title string `json:"title"`
MetaDescription string `json:"metaDescription,omitempty"`
NationalStatistic *bool `json:"nationalStatistic,omitempty"`
PreUnit string `json:"preUnit,omitempty"`
Headline1 string `json:"headline1,omitempty"`
Headline2 string `json:"headline2,omitempty"`
Headline3 string `json:"headline3,omitempty"`
} `json:"description"`
Type string `json:"type"`
URI string `json:"uri"`
}
type ESSuggestLegacy ¶
type ESSuggestLegacy struct {
SearchSuggest []ESSearchSuggestLegacy `json:"search_suggest"`
}
type EsResponse ¶
type EsResponse struct {
Took int `json:"took"`
Hits ESResponseHits `json:"hits"`
Aggregations ESResponseAggregations `json:"aggregations"`
Suggest Suggest `json:"suggest"`
}
type EsResponses ¶
type EsResponses struct {
Responses []*EsResponse `json:"responses"`
}
EsResponse holds a response slice from ES
type FilterCount ¶
type FilterCount struct {
Type string `json:"type"`
Label string `json:"label"`
Count int `json:"count"`
}
FilterCount represents the API response for an aggregation
type HighlightObj ¶
type HighlightObjLegacy ¶
type HighlightObjLegacy struct {
DatasetID string `json:"dataset_id,omitempty"`
Edition string `json:"edition,omitempty"`
Keywords []*string `json:"keywords,omitempty"`
MetaDescription string `json:"meta_description,omitempty"`
Summary string `json:"summary,omitempty"`
Title string `json:"title,omitempty"`
}
type Item ¶ added in v1.33.0
type Item struct {
DataType string `json:"type"`
CDID string `json:"cdid"`
DatasetID string `json:"dataset_id"`
Edition string `json:"edition"`
Keywords []string `json:"keywords"`
MetaDescription string `json:"meta_description"`
ReleaseDate string `json:"release_date,omitempty"`
Summary string `json:"summary"`
Title string `json:"title"`
Topics []string `json:"topics"`
URI string `json:"uri"`
Highlight *HighlightObj `json:"highlight,omitempty"`
DateChanges []ReleaseDateChange `json:"date_changes,omitempty"`
Cancelled bool `json:"cancelled,omitempty"`
CanonicalTopic string `json:"canonical_topic"`
Finalised bool `json:"finalised,omitempty"`
ProvisionalDate string `json:"provisional_date,omitempty"`
Published bool `json:"published,omitempty"`
Language string `json:"language,omitempty"`
Survey string `json:"survey,omitempty"`
PopulationType string `json:"population_type,omitempty"`
Dimensions []ESDimensions `json:"dimensions,omitempty"`
}
type ReleaseDateChange ¶
type ReleaseDateChange struct {
ChangeNotice string `json:"change_notice"`
Date string `json:"previous_date"`
}
ReleaseDateChange represent a date change of a release
type SearchResponse ¶
type SearchResponse struct {
Count int `json:"count"`
Took int `json:"took"`
DistinctItemsCount int `json:"distinct_items_count"`
Topics []FilterCount `json:"topics"`
ContentTypes []FilterCount `json:"content_types"`
Items []Item `json:"items"`
Suggestions []string `json:"suggestions,omitempty"`
AdditionSuggestions []string `json:"additional_suggestions,omitempty"`
Dimensions []FilterCount `json:"dimensions,omitempty"`
PopulationType []FilterCount `json:"population_type,omitempty"`
}
type SearchResponseLegacy ¶
type SearchResponseLegacy struct {
Count int `json:"count"`
Took int `json:"took"`
ContentTypes []FilterCount `json:"content_types"`
Items []ContentItemLegacy `json:"items"`
Suggestions []string `json:"suggestions,omitempty"`
AdditionSuggestions []string `json:"additional_suggestions,omitempty"`
}
Structs representing the transformed response
type SearchSuggest ¶
type Suggest ¶
type Suggest struct {
SearchSuggest []SearchSuggest `json:"search_suggest"`
}
Click to show internal directories.
Click to hide internal directories.