tagindex

package module
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 5 Imported by: 0

README

tagindex

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetContains

func SetContains(a, b []uint32) bool

SetContains returns true if a has all elements of b. input slice values must be sorted from lowest to highest.

Types

type Bloom

type Bloom [4]uint64

func MakeBloom

func MakeBloom(data []uint32, k int) Bloom

func (Bloom) Contains

func (t Bloom) Contains(o Bloom) bool

type Entry

type Entry struct {
	ID    string
	Order int64
	Tags  []string
}

type Index

type Index struct {
	// contains filtered or unexported fields
}

func New

func New() *Index

func (*Index) Commit

func (t *Index) Commit()

func (*Index) Put

func (t *Index) Put(e ...Entry)

func (*Index) Query

func (t *Index) Query(tags []string, limit int) QueryResult

func (*Index) Tags added in v0.2.1

func (t *Index) Tags(prefix string, limit int) []TagInfo

type QueryResult

type QueryResult struct {
	Data       []Entry
	TotalCount int
}

type TagInfo added in v0.2.1

type TagInfo struct {
	Tag   string
	Count int
}

Jump to

Keyboard shortcuts

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