helpers

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ObjectsBucket       = []byte("objects")
	ObjectsBucketLSM    = "objects"
	DimensionsBucketLSM = "dimensions"
	DocIDBucket         = []byte("doc_ids")
)

Functions

func BucketFromPropName

func BucketFromPropName(propName string) []byte

BucketFromPropName creates the byte-representation used as the bucket name for a partiular prop in the inverted index

func BucketFromPropNameLSM added in v1.5.0

func BucketFromPropNameLSM(propName string) string

BucketFromPropName creates the byte-representation used as the bucket name for a partiular prop in the inverted index

func HashBucketFromPropNameLSM added in v1.5.0

func HashBucketFromPropNameLSM(propName string) string

HashBucketFromPropName creates the byte-representation used as the bucket name for the status information of a partiular prop in the inverted index

func MetaCountProp

func MetaCountProp(propName string) string

MetaCountProp helps create an internally used propName for meta props that don't explicitly exist in the user schema, but are required for proper indexing, such as the count of arrays.

func TokenizeString added in v0.22.20

func TokenizeString(in string) []string

TokenizeString only splits on white spaces, it does not alter casing

func TokenizeText added in v0.22.20

func TokenizeText(in string) []string

Tokenize Text splits on any non-alphanumerical and lowercases the words

func TokenizeTextKeepWildcards added in v0.22.20

func TokenizeTextKeepWildcards(in string) []string

Tokenize Text splits on any non-alphanumerical except wildcard-symbols and lowercases the words

func TrimString added in v1.12.0

func TrimString(in string) string

TrimString trims on white spaces

Types

type AllowList added in v0.22.19

type AllowList map[uint64]struct{}

AllowList groups a list of possible indexIDs to be passed to a secondary index. The secondary index must make sure that it only returns result present on the AllowList

func (AllowList) Contains added in v0.22.19

func (al AllowList) Contains(id uint64) bool

Contains is not thread-safe if the list is still being filled. However, if you can guarantee that the list is no longer being inserted into and it effectively becomes read-only, you can safely read concurrently

func (AllowList) DeepCopy added in v0.22.19

func (al AllowList) DeepCopy() AllowList

func (AllowList) Insert added in v0.22.19

func (al AllowList) Insert(id uint64)

Inserting and reading is not thread-safe. However, if inserting has completed, and the list can be considered read-only, it is safe to read from it concurrently

func (AllowList) Slice added in v1.14.0

func (al AllowList) Slice() []uint64

Jump to

Keyboard shortcuts

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