helpers

package
v1.18.5 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ObjectsBucket              = []byte("objects")
	ObjectsBucketLSM           = "objects"
	CompressedObjectsBucketLSM = "compressed_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

func BucketFromPropNameLSM(propName string) string

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

func BucketFromPropNameLengthLSM added in v1.18.0

func BucketFromPropNameLengthLSM(propName string) string

func BucketFromPropNameNullLSM added in v1.18.0

func BucketFromPropNameNullLSM(propName string) string

func CountDuplicates added in v1.18.0

func CountDuplicates(parts []string) ([]string, []int)

func HashBucketFromPropNameLSM

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 HashBucketFromPropNameLengthLSM added in v1.18.0

func HashBucketFromPropNameLengthLSM(propName string) string

func HashBucketFromPropNameNullLSM added in v1.18.0

func HashBucketFromPropNameNullLSM(propName string) string

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 TempBucketFromBucketName added in v1.18.0

func TempBucketFromBucketName(bucketName string) string

func TokenizeString

func TokenizeString(in string) []string

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

func TokenizeStringAndCountDuplicates added in v1.18.0

func TokenizeStringAndCountDuplicates(in string) ([]string, []int)

func TokenizeText

func TokenizeText(in string) []string

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

func TokenizeTextAndCountDuplicates added in v1.18.0

func TokenizeTextAndCountDuplicates(in string) ([]string, []int)

func TokenizeTextKeepWildcards

func TokenizeTextKeepWildcards(in string) []string

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

func TrimString

func TrimString(in string) string

TrimString trims on white spaces

Types

type AllowList

type AllowList interface {
	Insert(ids ...uint64)
	Contains(id uint64) bool
	DeepCopy() AllowList
	Slice() []uint64
	Len() int
	IsEmpty() bool
	Size() uint64
	Iterator() AllowListIterator
	LimitedIterator(limit int) AllowListIterator
}

func NewAllowList added in v1.18.0

func NewAllowList(ids ...uint64) AllowList

func NewAllowListFromBitmap added in v1.18.0

func NewAllowListFromBitmap(bm *sroar.Bitmap) AllowList

func NewAllowListFromBitmapDeepCopy added in v1.18.0

func NewAllowListFromBitmapDeepCopy(bm *sroar.Bitmap) AllowList

type AllowListIterator added in v1.18.0

type AllowListIterator interface {
	Next() (uint64, bool)
	Len() int
}

Jump to

Keyboard shortcuts

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