Documentation ¶
Index ¶
- Variables
- type Automaton
- type DictionaryIterator
- type DocValueVisitable
- type DocVisitState
- type Location
- type OptimizablePostingsIterator
- type PersistedSegment
- type Posting
- type PostingsIterator
- type PostingsList
- type Segment
- type StatsReporter
- type StoredFieldValueVisitor
- type TermDictionary
- type UnpersistedSegment
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = fmt.Errorf("index closed")
Functions ¶
This section is empty.
Types ¶
type Automaton ¶
type Automaton interface { // Start returns the start state Start() int // IsMatch returns true if and only if the state is a match IsMatch(int) bool // CanMatch returns true if and only if it is possible to reach a match // in zero or more steps CanMatch(int) bool // WillAlwaysMatch returns true if and only if the current state matches // and will always match no matter what steps are taken WillAlwaysMatch(int) bool // Accept returns the next state given the input to the specified state Accept(int, byte) int }
Automaton represents the general contract of a byte-based finite automaton
type DictionaryIterator ¶
type DocValueVisitable ¶
type DocValueVisitable interface { VisitDocValues(localDocNum uint64, fields []string, visitor index.DocValueVisitor, optional DocVisitState) (DocVisitState, error) // VisitableDocValueFields implementation should return // the list of fields which are document value persisted and // therefore visitable by the above VisitDocValues method. VisitableDocValueFields() ([]string, error) }
DocValueVisitable is implemented by various scorch segment implementations with persistence for the un inverting of the postings or other indexed values.
type DocVisitState ¶
type DocVisitState interface { }
type PersistedSegment ¶
type PostingsIterator ¶
type PostingsIterator interface { // The caller is responsible for copying whatever it needs from // the returned Posting instance before calling Next(), as some // implementations may return a shared instance to reduce memory // allocations. Next() (Posting, error) // Advance will return the posting with the specified doc number // or if there is no such posting, the next posting. // Callers MUST NOT attempt to pass a docNum that is less than or // equal to the currently visited posting doc Num. Advance(docNum uint64) (Posting, error) Size() int }
type PostingsList ¶
type PostingsList interface { Iterator(includeFreq, includeNorm, includeLocations bool, prealloc PostingsIterator) PostingsIterator Size() int Count() uint64 }
type Segment ¶
type Segment interface { Dictionary(field string) (TermDictionary, error) VisitStoredFields(num uint64, visitor StoredFieldValueVisitor) error DocID(num uint64) ([]byte, error) Count() uint64 DocNumbers([]string) (*roaring.Bitmap, error) Fields() []string Close() error Size() int AddRef() DecRef() error }
type StatsReporter ¶
type StatsReporter interface {
ReportBytesWritten(bytesWritten uint64)
}
type StoredFieldValueVisitor ¶
StoredFieldValueVisitor defines a callback to be visited for each stored field value. The return value determines if the visitor should keep going. Returning true continues visiting, false stops.
type TermDictionary ¶
type TermDictionary interface { PostingsList(term []byte, except *roaring.Bitmap, prealloc PostingsList) (PostingsList, error) AutomatonIterator(a Automaton, startKeyInclusive, endKeyExclusive []byte) DictionaryIterator Contains(key []byte) (bool, error) }
type UnpersistedSegment ¶
Click to show internal directories.
Click to hide internal directories.