Documentation ¶
Index ¶
- func CollectionsScopeByContentUnit(mdb *sql.DB, cuUID string) ([]string, error)
- func CollectionsScopeByFile(mdb *sql.DB, fileUID string) ([]string, error)
- func ConvertDocx(db *sql.DB) error
- func DocFolder() (string, error)
- func DownloadAndConvert(docBatch [][]string) error
- func DumpDB(mdb *sql.DB, title string) error
- func DumpIndexes(esc *elastic.Client, title string, resultType string) error
- func IndexAliasName(namespace string, name string, lang string) string
- func IndexName(namespace string, name string, lang string, date string) string
- func InitConfigFolder(configKey string, value *string) (string, error)
- func InitVars()
- func IsWindows() bool
- func KeyIValues(t string, uids []string) []interface{}
- func KeyValues(t string, uids []string) []string
- func KeyValuesToValues(t string, typedUIDs []string) ([]string, error)
- func LoadDocFilename(db *sql.DB, fileUID string) (string, error)
- func ParseDocx(docxPath string) (string, error)
- func ProdAliasedIndexDate(esc *elastic.Client) (error, string)
- func SourcesFolder() (string, error)
- func Suffixes(title string) []string
- func SwitchAliasToCurrentIndex(namespace string, name string, date string, esc *elastic.Client) error
- func SwitchProdAliasToCurrentIndex(date string, esc *elastic.Client) error
- type BaseIndex
- func (index *BaseIndex) CreateIndex() error
- func (index *BaseIndex) DeleteIndex() error
- func (index *BaseIndex) FilterByResultTypeQuery(resultType string) *elastic.BoolQuery
- func (index *BaseIndex) RefreshIndex() error
- func (index *BaseIndex) RefreshIndexByLang(lang string) error
- func (index *BaseIndex) RemoveFromIndexQuery(elasticScope elastic.Query) ([]string, error)
- func (index *BaseIndex) ResultType() string
- type BlogIndex
- type Classification
- type ClassificationIntent
- type Collection
- type CollectionsIndex
- type ContentUnit
- type ContentUnitsIndex
- type EffectiveDate
- type File
- type Index
- type IndexData
- type Indexer
- func (indexer *Indexer) BlogPostUpdate(id string) error
- func (indexer *Indexer) CollectionUpdate(uid string) error
- func (indexer *Indexer) ContentUnitUpdate(uid string) error
- func (indexer *Indexer) CreateIndexes() error
- func (indexer *Indexer) DeleteIndexes() error
- func (indexer *Indexer) FileUpdate(uid string) error
- func (indexer *Indexer) PersonUpdate(uid string) error
- func (indexer *Indexer) PublisherUpdate(uid string) error
- func (indexer *Indexer) RefreshAll() error
- func (indexer *Indexer) ReindexAll() error
- func (indexer *Indexer) SourceUpdate(uid string) error
- func (indexer *Indexer) TagUpdate(uid string) error
- func (indexer *Indexer) TweetUpdate(tid string) error
- type OffsetLimitJob
- type Result
- type ResultType
- type Scope
- type Source
- type SourcesIndex
- type TagsIndex
- type TweeterIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectionsScopeByContentUnit ¶ added in v0.7.7
func CollectionsScopeByFile ¶ added in v0.7.7
func ConvertDocx ¶
func DownloadAndConvert ¶ added in v0.7.4
func DumpIndexes ¶ added in v0.7.7
func IndexAliasName ¶ added in v1.0.5
func InitConfigFolder ¶ added in v0.8.9
func KeyIValues ¶ added in v1.0.5
func KeyValuesToValues ¶ added in v1.0.5
func LoadDocFilename ¶ added in v0.7.4
Will return empty string if no rows returned.
func ProdAliasedIndexDate ¶ added in v1.0.5
func SourcesFolder ¶ added in v0.8.9
func SwitchAliasToCurrentIndex ¶ added in v1.0.5
func SwitchProdAliasToCurrentIndex ¶ added in v1.0.5
Types ¶
type BaseIndex ¶ added in v0.6.7
type BaseIndex struct {
// contains filtered or unexported fields
}
func (*BaseIndex) CreateIndex ¶ added in v0.6.7
func (*BaseIndex) DeleteIndex ¶ added in v0.6.7
func (*BaseIndex) FilterByResultTypeQuery ¶ added in v1.0.5
func (*BaseIndex) RefreshIndex ¶ added in v0.6.7
func (*BaseIndex) RefreshIndexByLang ¶ added in v0.6.7
func (*BaseIndex) RemoveFromIndexQuery ¶ added in v1.0.5
func (*BaseIndex) ResultType ¶ added in v1.0.5
type BlogIndex ¶ added in v1.1.8
func MakeBlogIndex ¶ added in v1.1.8
func (*BlogIndex) ReindexAll ¶ added in v1.1.8
type Classification ¶
type Classification struct { MDB_UID string `json:"mdb_uid"` Name string `json:"name,omitempty"` NameSuggest string `json:"name_suggest,omitempty"` Description string `json:"description,omitempty"` DescriptionSuggest string `json:"description_suggest,omitempty"` Type string `json:"classification_type"` }
type ClassificationIntent ¶ added in v0.8.9
type ClassificationIntent struct { // Fields from result. ResultType string `json:"result_type"` MDB_UID string `json:"mdb_uid"` Title string `json:"title"` // Intent fields. ContentType string `json:"content_type"` Exist bool `json:"exist"` Score *float64 `json:"score,omitempty"` Explanation elastic.SearchExplanation `json:"explanation,omitempty"` MaxScore *float64 `json:"max_score,omitempty"` MaxExplanation elastic.SearchExplanation `json:"max_explanation,omitempty"` }
type Collection ¶
type Collection struct { MDB_UID string `json:"mdb_uid"` TypedUIDs []string `json:"typed_uids"` Name string `json:"name"` Description string `json:"description"` ContentType string `json:"content_type"` ContentUnitsContentTypes []string `json:"content_units_content_types,omitempty"` EffectiveDate *utils.Date `json:"effective_date"` OriginalLanguage string `json:"original_language,omitempty"` }
type CollectionsIndex ¶ added in v0.6.7
type CollectionsIndex struct {
BaseIndex
}
func MakeCollectionsIndex ¶ added in v0.6.9
func MakeCollectionsIndex(namespace string, indexDate string, db *sql.DB, esc *elastic.Client) *CollectionsIndex
func (*CollectionsIndex) ReindexAll ¶ added in v0.6.9
func (index *CollectionsIndex) ReindexAll() error
func (*CollectionsIndex) Update ¶ added in v0.6.9
func (index *CollectionsIndex) Update(scope Scope) error
type ContentUnit ¶
type ContentUnit struct { MDB_UID string `json:"mdb_uid"` TypedUIDs []string `json:"typed_uids"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` ContentType string `json:"content_type"` CollectionsContentTypes []string `json:"collections_content_types,omitempty"` EffectiveDate *utils.Date `json:"effective_date,omitempty"` Duration uint64 `json:"duration,omitempty"` OriginalLanguage string `json:"original_language,omitempty"` Translations []string `json:"translations,omitempty"` Tags []string `json:"tags,omitempty"` Sources []string `json:"sources,omitempty"` Authors []string `json:"authors,omitempty"` Persons []string `json:"persons,omitempty"` Transcript string `json:"transcript,omitempty"` }
type ContentUnitsIndex ¶ added in v0.6.7
func MakeContentUnitsIndex ¶ added in v0.6.7
func MakeContentUnitsIndex(namespace string, indexDate string, db *sql.DB, esc *elastic.Client) *ContentUnitsIndex
func (*ContentUnitsIndex) ReindexAll ¶ added in v0.6.7
func (index *ContentUnitsIndex) ReindexAll() error
func (*ContentUnitsIndex) Update ¶ added in v0.6.7
func (index *ContentUnitsIndex) Update(scope Scope) error
type EffectiveDate ¶ added in v0.6.9
type File ¶
type File struct { MDB_UID string `json:"mdb_uid"` Name string `json:"name"` Size uint64 `json:"size"` URL string `json:"url"` Secure int `json:"secure"` FilmDate *utils.Date `json:"film_date"` Duration float64 `json:"duration,omitempty"` Language string `json:"language,omitempty"` MimeType string `json:"mimetype,omitempty"` Type string `json:"type,omitempty"` SubType string `json:"subtype,omitempty"` }
type IndexData ¶ added in v0.6.7
type Indexer ¶ added in v0.6.7
type Indexer struct {
// contains filtered or unexported fields
}
func MakeFakeIndexer ¶ added in v0.7.0
func MakeIndexer ¶ added in v0.6.7
func MakeIndexer(namespace string, date string, names []string, mdb *sql.DB, esc *elastic.Client) (*Indexer, error)
Receives namespace and list of indexes names.
func MakeProdIndexer ¶ added in v0.6.7
func (*Indexer) BlogPostUpdate ¶ added in v1.1.8
func (*Indexer) CollectionUpdate ¶ added in v0.6.7
Set of MDB event handlers to incrementally change all indexes.
func (*Indexer) ContentUnitUpdate ¶ added in v0.6.7
func (*Indexer) CreateIndexes ¶ added in v0.6.7
func (*Indexer) DeleteIndexes ¶ added in v0.6.7
func (*Indexer) FileUpdate ¶ added in v0.6.7
func (*Indexer) PersonUpdate ¶ added in v0.6.7
func (*Indexer) PublisherUpdate ¶ added in v0.6.7
func (*Indexer) RefreshAll ¶ added in v0.6.7
func (*Indexer) ReindexAll ¶ added in v0.6.7
func (*Indexer) SourceUpdate ¶ added in v0.6.7
func (*Indexer) TweetUpdate ¶ added in v1.1.8
type OffsetLimitJob ¶ added in v1.0.5
type Result ¶ added in v1.0.5
type Result struct { // Document type. ResultType string `json:"result_type"` MDB_UID string `json:"mdb_uid"` TypedUids []string `json:"typed_uids"` FilterValues []string `json:"filter_values"` // Result content fields. Title string `json:"title"` Description string `json:"description,omitempty"` Content string `json:"content,omitempty"` EffectiveDate *utils.Date `json:"effective_date,omitempty"` // Suggest field for autocomplete. TitleSuggest []string `json:"title_suggest"` }
For full description see make.py RESULTS TEMPLATE.
func (*Result) ToDebugString ¶ added in v1.1.3
type ResultType ¶ added in v1.0.5
type ResultType struct {
ResultType string `json:"result_type"`
}
type Source ¶ added in v0.8.9
type Source struct { MDB_UID string `json:"mdb_uid"` Name string `json:"name"` // Deprecated fields (since we use 'Result Template' in order to index the sources): Description string `json:"description"` Content string `json:"content"` Sources []string `json:"sources"` Authors []string `json:"authors"` PathNames []string `json:"path_names"` FullName []string `json:"full_name"` }
type SourcesIndex ¶ added in v0.8.9
func MakeSourcesIndex ¶ added in v0.8.9
func MakeSourcesIndex(namespace string, indexDate string, db *sql.DB, esc *elastic.Client) *SourcesIndex
func (*SourcesIndex) ReindexAll ¶ added in v0.8.9
func (index *SourcesIndex) ReindexAll() error
func (*SourcesIndex) Update ¶ added in v0.8.9
func (index *SourcesIndex) Update(scope Scope) error
type TagsIndex ¶ added in v1.0.5
type TagsIndex struct {
BaseIndex
}
func MakeTagsIndex ¶ added in v1.0.5
func (*TagsIndex) ReindexAll ¶ added in v1.0.5
type TweeterIndex ¶ added in v1.1.8
func MakeTweeterIndex ¶ added in v1.1.8
func MakeTweeterIndex(namespace string, indexDate string, db *sql.DB, esc *elastic.Client) *TweeterIndex
func (*TweeterIndex) ReindexAll ¶ added in v1.1.8
func (index *TweeterIndex) ReindexAll() error
func (*TweeterIndex) Update ¶ added in v1.1.8
func (index *TweeterIndex) Update(scope Scope) error
Click to show internal directories.
Click to hide internal directories.