schema

package
v0.259.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2026 License: AGPL-3.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
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

View Source
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.

View Source
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].

View Source
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].

FeedsIndexTemplate is a index template for [models.Feed].

View Source
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)),
		),
	),
)

SchedulerComponentTemplate is a component template containing SchedulerMappings.

SchedulerIndexTemplate is a index template for [models.Feed].

SchedulerMappings is the field mappings for [models.Session].

SessionsComponentTemplate is a component template containing SchedulerMappings.

SessionsIndexTemplate is a index template for [models.Feed].

SessionsMappings is the field mappings for [models.Session].

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL