posting

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package posting implements a posting list contains a list of document ids.

Index

Constants

This section is empty.

Variables

View Source
var ErrListEmpty = errors.New("postings list is empty")

ErrListEmpty indicates the postings list is empty.

Functions

This section is empty.

Types

type Iterator

type Iterator interface {
	Next() bool

	Current() uint64

	Close() error
}

Iterator allows iterating over a posting list.

type List

type List interface {
	Contains(id uint64) bool

	IsEmpty() bool

	Max() (uint64, error)

	Len() int

	Iterator() Iterator

	Clone() List

	Equal(other List) bool

	Insert(i uint64)

	Intersect(other List) error

	Difference(other List) error

	Union(other List) error

	UnionMany(others []List) error

	AddIterator(iter Iterator) error

	AddRange(min, max uint64) error

	RemoveRange(min, max uint64) error

	Reset()

	ToSlice() []uint64

	Marshall() ([]byte, error)

	Unmarshall(data []byte) error

	SizeInBytes() int64
}

List is a collection of uint64.

Directories

Path Synopsis
Package roaring implements the posting list by a roaring bitmap.
Package roaring implements the posting list by a roaring bitmap.

Jump to

Keyboard shortcuts

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