posting

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 2 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() common.ItemID

	Close() error
}

Iterator allows iterating over a posting list.

type List

type List interface {
	Contains(id common.ItemID) bool

	IsEmpty() bool

	Max() (common.ItemID, error)

	Len() int

	Iterator() Iterator

	Clone() List

	Equal(other List) bool

	Insert(i common.ItemID)

	Intersect(other List) error

	Difference(other List) error

	Union(other List) error

	UnionMany(others []List) error

	AddIterator(iter Iterator) error

	AddRange(min, max common.ItemID) error

	RemoveRange(min, max common.ItemID) error

	Reset()

	ToSlice() []common.ItemID

	Marshall() ([]byte, error)

	Unmarshall(data []byte) error

	SizeInBytes() int64
}

List is a collection of common.ItemID.

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