Documentation
¶
Index ¶
Constants ¶
const ( FeedsIndex opensearch.Index = "feeds" ItemsIndex opensearch.Index = "items" FavoritesIndex opensearch.Index = "favorites" UsersIndex opensearch.Index = "users" SubscriptionsIndex opensearch.Index = "subscriptions" SchedulerIndex opensearch.Index = "scheduler" SessionsIndex opensearch.Index = "sessions" ImportsIndex opensearch.Index = "imports" )
Variables ¶
var AllIndices = []opensearch.Index{ FeedsIndex, ItemsIndex, FavoritesIndex, UsersIndex, SubscriptionsIndex, SchedulerIndex, SessionsIndex, ImportsIndex, }
var CommonComponentTemplate = indices.NewComponentTemplateRequest("common", indices.WithIndexSettings( indices.WithMappings(CommonMappings), indices.WithAnalyzer(englishExactAnalyzer), indices.WithAnalyzer(personAnalyzer), indices.WithAnalyzer(htmlAnalyzer), indices.WithTokenizer(emailTokenizer), indices.WithNormalizer(lowercaseNormalizer), ), )
CommonComponentTemplate is a component template containing the common mappings.
var CommonMappings = indices.NewMappings( indices.WithMapping[opensearchapi.CommonMappingDateNanosProperty]("published"), indices.WithMapping[opensearchapi.CommonMappingDateNanosProperty]("updated"), indices.WithMapping("title", indices.WithTextMappingProperties( indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("raw"), indices.WithMapping("exact", indices.WithTextMappingAnalyzer(englishExactAnalyzer), ), indices.WithMapping[opensearchapi.CommonMappingSearchAsYouTypeProperty]("search"), ), ), indices.WithMapping("description", indices.WithTextMappingAnalyzer(htmlAnalyzer)), indices.WithMapping("authors", indices.WithTextMappingAnalyzer(personAnalyzer), indices.WithTextMappingProperties( indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("raw"), indices.WithMapping("exact", indices.WithTextMappingAnalyzer(englishExactAnalyzer), ), indices.WithMapping[opensearchapi.CommonMappingSearchAsYouTypeProperty]("search"), ), ), indices.WithMapping("contributors", indices.WithTextMappingAnalyzer(personAnalyzer), indices.WithTextMappingProperties( indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("raw"), indices.WithMapping("exact", indices.WithTextMappingAnalyzer(englishExactAnalyzer), ), indices.WithMapping[opensearchapi.CommonMappingSearchAsYouTypeProperty]("search"), ), ), indices.WithMapping("categories", indices.WithTextMappingProperties( indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("raw"), indices.WithMapping("raw_nocase", indices.WithKeywordMappingNormalizer(lowercaseNormalizer), ), indices.WithMapping("exact", indices.WithTextMappingAnalyzer(englishExactAnalyzer), ), indices.WithMapping[opensearchapi.CommonMappingSearchAsYouTypeProperty]("search"), ), ), indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("language"), indices.WithMapping[opensearchapi.CommonMappingTextProperty]("copyright"), indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("source_type"), indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("url"), indices.WithMapping("image", indices.WithObjectMappingDynamic(opensearchapi.NewCommonMappingDynamicFromBool(false)), indices.WithObjectMappingProperties( indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("url"), indices.WithMapping[opensearchapi.CommonMappingTextProperty]("title"), ), ), )
CommonMappings are field mappings common across [models.Item] and [models.Feed].
var FeedsComponentTemplate = indices.NewComponentTemplateRequest(FeedsIndex.String(), indices.WithIndexSettings( indices.WithMappings(FeedsMappings), indices.WithAnalyzer(englishExactAnalyzer), indices.WithAnalyzer(domainNameAnalyzer), indices.WithTokenizer(domainTokenizer), indices.WithAnalyzer(htmlAnalyzer), indices.WithTokenizer(emailTokenizer), ), )
FeedsComponentTemplate is a component template containing [FeedMappings].
var FeedsIndexTemplate = indices.NewIndexTemplateRequest(FeedsIndex.String(), indices.WithComponentTemplates("common", FeedsIndex.String()), indices.WithIndexPatterns(FeedsIndex.String()+"-*"), indices.WithIndexTemplatePriority(999), )
FeedsIndexTemplate is a index template for [models.Feed].
var FeedsMappings = indices.NewMappings( indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("feed_id"), indices.WithMapping[opensearchapi.CommonMappingDateNanosProperty]("created_at"), indices.WithMapping[opensearchapi.CommonMappingDateNanosProperty]("last_fetched"), indices.WithMapping[opensearchapi.CommonMappingUnsignedLongNumberProperty]("update_interval"), indices.WithMapping[opensearchapi.CommonMappingBooleanProperty]("updates_disabled"), indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("source_urls"), indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("fetch_method"), indices.WithMapping[opensearchapi.CommonMappingFlatObjectProperty]("fetch_options"), indices.WithMapping[opensearchapi.CommonMappingFlatObjectProperty]("quirks"), indices.WithMapping("domain", indices.WithTextMappingAnalyzer(domainNameAnalyzer), indices.WithTextMappingProperties( indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("raw"), indices.WithMapping[opensearchapi.CommonMappingSearchAsYouTypeProperty]("search"), ), ), indices.WithMapping[opensearchapi.CommonMappingFlatObjectProperty]("source_data"), indices.WithMapping("customisation", indices.WithObjectMappingDynamic(opensearchapi.NewCommonMappingDynamicFromBool(false)), indices.WithObjectMappingProperties( indices.WithMapping("title", indices.WithTextMappingProperties( indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("raw"), indices.WithMapping("exact", indices.WithTextMappingAnalyzer(englishExactAnalyzer), ), indices.WithMapping[opensearchapi.CommonMappingSearchAsYouTypeProperty]("search"), ), ), indices.WithMapping("description", indices.WithTextMappingAnalyzer(htmlAnalyzer)), ), ), )
var SchedulerComponentTemplate = indices.NewComponentTemplateRequest(SchedulerIndex.String(), indices.WithIndexSettings( indices.WithMappings(SchedulerMappings), ), )
SchedulerComponentTemplate is a component template containing SchedulerMappings.
var SchedulerIndexTemplate = indices.NewIndexTemplateRequest(SchedulerIndex.String(), indices.WithComponentTemplates(SchedulerIndex.String()), indices.WithIndexPatterns(SchedulerIndex.String()+"-*"), indices.WithIndexTemplatePriority(999), )
SchedulerIndexTemplate is a index template for [models.Feed].
var SchedulerMappings = indices.NewMappings( indices.WithMapping[opensearchapi.CommonMappingDateNanosProperty]("created_at"), indices.WithMapping[opensearchapi.CommonMappingDateNanosProperty]("updated_at"), indices.WithMapping[opensearchapi.CommonMappingFlatObjectProperty]("job_options"), indices.WithMapping[opensearchapi.CommonMappingFlatObjectProperty]("job_data"), indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("job_type"), indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("job_key"), indices.WithMapping[opensearchapi.CommonMappingTextProperty]("job_description"), indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("job_trigger_type"), indices.WithMapping[opensearchapi.CommonMappingFlatObjectProperty]("job_trigger"), indices.WithMapping[opensearchapi.CommonMappingDateNanosProperty]("job_next_run"), )
SchedulerMappings is the field mappings for [models.Session].
var SessionsComponentTemplate = indices.NewComponentTemplateRequest(SessionsIndex.String(), indices.WithIndexSettings( indices.WithMappings(SessionsMappings), ), )
SessionsComponentTemplate is a component template containing SchedulerMappings.
var SessionsIndexTemplate = indices.NewIndexTemplateRequest(SessionsIndex.String(), indices.WithComponentTemplates(SessionsIndex.String()), indices.WithIndexPatterns(SessionsIndex.String()+"-*"), indices.WithIndexTemplatePriority(999), )
SessionsIndexTemplate is a index template for [models.Feed].
var SessionsMappings = indices.NewMappings( indices.WithMapping[opensearchapi.CommonMappingDateNanosProperty]("created_at"), indices.WithMapping[opensearchapi.CommonMappingDateNanosProperty]("expiry"), indices.WithMapping[opensearchapi.CommonMappingKeywordProperty]("token"), indices.WithMapping[opensearchapi.CommonMappingBinaryProperty]("data"), )
SessionsMappings is the field mappings for [models.Session].
Functions ¶
This section is empty.
Types ¶
This section is empty.