Documentation ¶
Overview ¶
Package firestorm is a generated protocol buffer package.
It is generated from these files:
firestorm_rows.proto
It has these top-level messages:
VersionValue FieldValue DictionaryValue TermVector TermFreqValue StoredValue
Index ¶
- Constants
- Variables
- func DictionaryRowKey(field uint16, term []byte) []byte
- func NewFirestorm(storeName string, storeConfig map[string]interface{}, ...) (index.Index, error)
- func SetLog(l *log.Logger)
- func StoredIteratorStartDocID(docID []byte) []byte
- func StoredPrefixDocIDNum(docID []byte, docNum uint64) []byte
- func TermFreqIteratorStart(field uint16, term []byte) []byte
- func TermFreqPrefixFieldTermDocId(field uint16, term []byte, docID []byte) []byte
- type Compensator
- func (c *Compensator) GarbageCollect(docNums []uint64)
- func (c *Compensator) GarbageCount() uint64
- func (c *Compensator) Migrate(docID []byte, docNum uint64, oldDocNums []uint64)
- func (c *Compensator) Mutate(docID []byte, docNum uint64)
- func (c *Compensator) MutateBatch(inflightItems []*InFlightItem, lastDocNum uint64)
- func (c *Compensator) Snapshot() *Snapshot
- type DictUpdater
- type DictionaryRow
- func (dr *DictionaryRow) Count() uint64
- func (dr *DictionaryRow) Key() []byte
- func (dr *DictionaryRow) KeySize() int
- func (dr *DictionaryRow) KeyTo(buf []byte) (int, error)
- func (dr *DictionaryRow) SetCount(count uint64)
- func (dr *DictionaryRow) Value() []byte
- func (dr *DictionaryRow) ValueSize() int
- func (dr *DictionaryRow) ValueTo(buf []byte) (int, error)
- type DictionaryValue
- func (m *DictionaryValue) GetCount() uint64
- func (m *DictionaryValue) Marshal() (data []byte, err error)
- func (m *DictionaryValue) MarshalTo(data []byte) (n int, err error)
- func (*DictionaryValue) ProtoMessage()
- func (m *DictionaryValue) Reset()
- func (m *DictionaryValue) Size() (n int)
- func (m *DictionaryValue) String() string
- func (m *DictionaryValue) Unmarshal(data []byte) error
- type DocNumberList
- type FieldRow
- func (fr *FieldRow) Index() uint16
- func (fr *FieldRow) Key() []byte
- func (fr *FieldRow) KeySize() int
- func (fr *FieldRow) KeyTo(buf []byte) (int, error)
- func (fr *FieldRow) Name() string
- func (fr *FieldRow) String() string
- func (fr *FieldRow) Value() []byte
- func (fr *FieldRow) ValueSize() int
- func (fr *FieldRow) ValueTo(buf []byte) (int, error)
- type FieldValue
- func (m *FieldValue) GetName() string
- func (m *FieldValue) Marshal() (data []byte, err error)
- func (m *FieldValue) MarshalTo(data []byte) (n int, err error)
- func (*FieldValue) ProtoMessage()
- func (m *FieldValue) Reset()
- func (m *FieldValue) Size() (n int)
- func (m *FieldValue) String() string
- func (m *FieldValue) Unmarshal(data []byte) error
- type Firestorm
- func (f *Firestorm) Advanced() (store.KVStore, error)
- func (f *Firestorm) Analyze(d *document.Document) *index.AnalysisResult
- func (f *Firestorm) Batch(batch *index.Batch) (err error)
- func (f *Firestorm) Close() error
- func (f *Firestorm) Delete(id string) error
- func (f *Firestorm) DeleteInternal(key []byte) (err error)
- func (f *Firestorm) DocCount() (uint64, error)
- func (f *Firestorm) DumpAll() chan interface{}
- func (f *Firestorm) DumpDoc(docID string) chan interface{}
- func (f *Firestorm) DumpFields() chan interface{}
- func (f *Firestorm) Open() (err error)
- func (f *Firestorm) Reader() (index.IndexReader, error)
- func (f *Firestorm) SetInternal(key, val []byte) (err error)
- func (f *Firestorm) Stats() json.Marshaler
- func (f *Firestorm) StatsMap() map[string]interface{}
- func (f *Firestorm) Update(doc *document.Document) (err error)
- func (f *Firestorm) Wait(timeout time.Duration) error
- type GarbageCollector
- type InFlightItem
- type InternalRow
- type KVVisitor
- type Lookuper
- type Snapshot
- type StoredRow
- func (sr *StoredRow) DocID() []byte
- func (sr *StoredRow) DocNum() uint64
- func (sr *StoredRow) Key() []byte
- func (sr *StoredRow) KeySize() int
- func (sr *StoredRow) KeyTo(buf []byte) (int, error)
- func (sr *StoredRow) ParseKey(key []byte) error
- func (sr *StoredRow) String() string
- func (sr *StoredRow) Value() []byte
- func (sr *StoredRow) ValueSize() int
- func (sr *StoredRow) ValueTo(buf []byte) (int, error)
- type StoredValue
- func (m *StoredValue) GetRaw() []byte
- func (m *StoredValue) Marshal() (data []byte, err error)
- func (m *StoredValue) MarshalTo(data []byte) (n int, err error)
- func (*StoredValue) ProtoMessage()
- func (m *StoredValue) Reset()
- func (m *StoredValue) Size() (n int)
- func (m *StoredValue) String() string
- func (m *StoredValue) Unmarshal(data []byte) error
- type TermFreqRow
- func (tfr *TermFreqRow) DictionaryRowKey() []byte
- func (tfr *TermFreqRow) DictionaryRowKeySize() int
- func (tfr *TermFreqRow) DictionaryRowKeyTo(buf []byte) (int, error)
- func (tfr *TermFreqRow) DocID() []byte
- func (tfr *TermFreqRow) DocNum() uint64
- func (tfr *TermFreqRow) Field() uint16
- func (tfr *TermFreqRow) Freq() uint64
- func (tfr *TermFreqRow) Key() []byte
- func (tfr *TermFreqRow) KeySize() int
- func (tfr *TermFreqRow) KeyTo(buf []byte) (int, error)
- func (tfr *TermFreqRow) Norm() float32
- func (tfr *TermFreqRow) ParseKey(key []byte) error
- func (tfr *TermFreqRow) String() string
- func (tfr *TermFreqRow) Term() []byte
- func (tfr *TermFreqRow) Value() []byte
- func (tfr *TermFreqRow) ValueSize() int
- func (tfr *TermFreqRow) ValueTo(buf []byte) (int, error)
- func (tfr *TermFreqRow) Vectors() []*TermVector
- type TermFreqValue
- func (m *TermFreqValue) GetFreq() uint64
- func (m *TermFreqValue) GetNorm() float32
- func (m *TermFreqValue) GetVectors() []*TermVector
- func (m *TermFreqValue) Marshal() (data []byte, err error)
- func (m *TermFreqValue) MarshalTo(data []byte) (n int, err error)
- func (*TermFreqValue) ProtoMessage()
- func (m *TermFreqValue) Reset()
- func (m *TermFreqValue) Size() (n int)
- func (m *TermFreqValue) String() string
- func (m *TermFreqValue) Unmarshal(data []byte) error
- type TermVector
- func (m *TermVector) GetArrayPositions() []uint64
- func (m *TermVector) GetEnd() uint64
- func (m *TermVector) GetField() uint32
- func (m *TermVector) GetPos() uint64
- func (m *TermVector) GetStart() uint64
- func (m *TermVector) Marshal() (data []byte, err error)
- func (m *TermVector) MarshalTo(data []byte) (n int, err error)
- func (*TermVector) ProtoMessage()
- func (m *TermVector) Reset()
- func (m *TermVector) Size() (n int)
- func (m *TermVector) String() string
- func (m *TermVector) Unmarshal(data []byte) error
- type VersionRow
- type VersionValue
- func (m *VersionValue) GetVersion() uint64
- func (m *VersionValue) Marshal() (data []byte, err error)
- func (m *VersionValue) MarshalTo(data []byte) (n int, err error)
- func (*VersionValue) ProtoMessage()
- func (m *VersionValue) Reset()
- func (m *VersionValue) Size() (n int)
- func (m *VersionValue) String() string
- func (m *VersionValue) Unmarshal(data []byte) error
Constants ¶
View Source
const ByteSeparator byte = 0xff
View Source
const DefaultDictUpdateThreshold = 10
View Source
const DefaultGarbageThreshold = 10
View Source
const DefaultMaxDocsPerPass = 1000
View Source
const IDFieldName = "_id"
View Source
const Name = "firestorm"
View Source
const Version uint64 = 1
Variables ¶
View Source
var DefaultDictUpdateSleep = 1 * time.Second
View Source
var DefaultGarbageSleep = 15 * time.Second
View Source
var DictionaryKeyPrefix = []byte{'d'}
View Source
var (
ErrInvalidLengthFirestormRows = fmt.Errorf("proto: negative length found during unmarshaling")
)
View Source
var FieldKeyPrefix = []byte{'f'}
View Source
var IncompatibleVersion = fmt.Errorf("incompatible version, %d is supported", Version)
View Source
var InternalKeyPrefix = []byte{'i'}
View Source
var StoredKeyPrefix = []byte{'s'}
View Source
var TermFreqKeyPrefix = []byte{'t'}
View Source
var VersionKey = []byte{'v'}
Functions ¶
func DictionaryRowKey ¶
func NewFirestorm ¶
func SetLog ¶
SetLog sets the logger used for logging by default log messages are sent to ioutil.Discard
func StoredPrefixDocIDNum ¶
func TermFreqIteratorStart ¶
Types ¶
type Compensator ¶
type Compensator struct {
// contains filtered or unexported fields
}
func NewCompensator ¶
func NewCompensator() *Compensator
func (*Compensator) GarbageCollect ¶
func (c *Compensator) GarbageCollect(docNums []uint64)
func (*Compensator) GarbageCount ¶
func (c *Compensator) GarbageCount() uint64
func (*Compensator) Migrate ¶
func (c *Compensator) Migrate(docID []byte, docNum uint64, oldDocNums []uint64)
func (*Compensator) Mutate ¶
func (c *Compensator) Mutate(docID []byte, docNum uint64)
func (*Compensator) MutateBatch ¶
func (c *Compensator) MutateBatch(inflightItems []*InFlightItem, lastDocNum uint64)
func (*Compensator) Snapshot ¶
func (c *Compensator) Snapshot() *Snapshot
type DictUpdater ¶
type DictUpdater struct {
// contains filtered or unexported fields
}
func NewDictUpdater ¶
func NewDictUpdater(f *Firestorm) *DictUpdater
func (*DictUpdater) Notify ¶
func (d *DictUpdater) Notify(term string, usage int64)
func (*DictUpdater) NotifyBatch ¶
func (d *DictUpdater) NotifyBatch(termUsages map[string]int64)
func (*DictUpdater) Start ¶
func (d *DictUpdater) Start()
func (*DictUpdater) Stop ¶
func (d *DictUpdater) Stop()
type DictionaryRow ¶
type DictionaryRow struct {
// contains filtered or unexported fields
}
func NewDictionaryRow ¶
func NewDictionaryRow(field uint16, term []byte, count uint64) *DictionaryRow
func NewDictionaryRowK ¶
func NewDictionaryRowK(key []byte) (*DictionaryRow, error)
func NewDictionaryRowKV ¶
func NewDictionaryRowKV(key, value []byte) (*DictionaryRow, error)
func (*DictionaryRow) Count ¶
func (dr *DictionaryRow) Count() uint64
func (*DictionaryRow) Key ¶
func (dr *DictionaryRow) Key() []byte
func (*DictionaryRow) KeySize ¶
func (dr *DictionaryRow) KeySize() int
func (*DictionaryRow) SetCount ¶
func (dr *DictionaryRow) SetCount(count uint64)
func (*DictionaryRow) Value ¶
func (dr *DictionaryRow) Value() []byte
func (*DictionaryRow) ValueSize ¶
func (dr *DictionaryRow) ValueSize() int
type DictionaryValue ¶
type DictionaryValue struct { Count *uint64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*DictionaryValue) GetCount ¶
func (m *DictionaryValue) GetCount() uint64
func (*DictionaryValue) Marshal ¶
func (m *DictionaryValue) Marshal() (data []byte, err error)
func (*DictionaryValue) MarshalTo ¶
func (m *DictionaryValue) MarshalTo(data []byte) (n int, err error)
func (*DictionaryValue) ProtoMessage ¶
func (*DictionaryValue) ProtoMessage()
func (*DictionaryValue) Reset ¶
func (m *DictionaryValue) Reset()
func (*DictionaryValue) Size ¶
func (m *DictionaryValue) Size() (n int)
func (*DictionaryValue) String ¶
func (m *DictionaryValue) String() string
func (*DictionaryValue) Unmarshal ¶
func (m *DictionaryValue) Unmarshal(data []byte) error
type DocNumberList ¶
type DocNumberList []uint64
func (DocNumberList) HighestValid ¶
func (l DocNumberList) HighestValid(maxRead uint64) uint64
HighestValid returns the highest valid doc number from a *SORTED* DocNumberList if no doc number in the list is valid, then 0
func (DocNumberList) Len ¶
func (l DocNumberList) Len() int
func (DocNumberList) Less ¶
func (l DocNumberList) Less(i, j int) bool
func (DocNumberList) Swap ¶
func (l DocNumberList) Swap(i, j int)
type FieldRow ¶
type FieldRow struct {
// contains filtered or unexported fields
}
func NewFieldRow ¶
func NewFieldRowKV ¶
type FieldValue ¶
type FieldValue struct { Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*FieldValue) GetName ¶
func (m *FieldValue) GetName() string
func (*FieldValue) Marshal ¶
func (m *FieldValue) Marshal() (data []byte, err error)
func (*FieldValue) ProtoMessage ¶
func (*FieldValue) ProtoMessage()
func (*FieldValue) Reset ¶
func (m *FieldValue) Reset()
func (*FieldValue) Size ¶
func (m *FieldValue) Size() (n int)
func (*FieldValue) String ¶
func (m *FieldValue) String() string
func (*FieldValue) Unmarshal ¶
func (m *FieldValue) Unmarshal(data []byte) error
type Firestorm ¶
type Firestorm struct {
// contains filtered or unexported fields
}
func (*Firestorm) DeleteInternal ¶
func (*Firestorm) DumpFields ¶
func (f *Firestorm) DumpFields() chan interface{}
func (*Firestorm) SetInternal ¶
type GarbageCollector ¶
type GarbageCollector struct {
// contains filtered or unexported fields
}
func NewGarbageCollector ¶
func NewGarbageCollector(f *Firestorm) *GarbageCollector
func (*GarbageCollector) NextBatch ¶
func (gc *GarbageCollector) NextBatch(n int) []uint64
func (*GarbageCollector) Notify ¶
func (gc *GarbageCollector) Notify(docNum uint64, docId []byte)
func (*GarbageCollector) Start ¶
func (gc *GarbageCollector) Start()
func (*GarbageCollector) Stop ¶
func (gc *GarbageCollector) Stop()
type InFlightItem ¶
type InFlightItem struct {
// contains filtered or unexported fields
}
type InternalRow ¶
type InternalRow struct {
// contains filtered or unexported fields
}
func NewInternalRow ¶
func NewInternalRow(key, val []byte) *InternalRow
func NewInternalRowKV ¶
func NewInternalRowKV(key, value []byte) (*InternalRow, error)
func (*InternalRow) Key ¶
func (ir *InternalRow) Key() []byte
func (*InternalRow) KeySize ¶
func (ir *InternalRow) KeySize() int
func (*InternalRow) String ¶
func (ir *InternalRow) String() string
func (*InternalRow) Value ¶
func (ir *InternalRow) Value() []byte
func (*InternalRow) ValueSize ¶
func (ir *InternalRow) ValueSize() int
type Lookuper ¶
type Lookuper struct {
// contains filtered or unexported fields
}
func NewLookuper ¶
func (*Lookuper) NotifyBatch ¶
func (l *Lookuper) NotifyBatch(items []*InFlightItem)
type StoredRow ¶
type StoredRow struct {
// contains filtered or unexported fields
}
func NewStoredRow ¶
func NewStoredRowKV ¶
type StoredValue ¶
type StoredValue struct { Raw []byte `protobuf:"bytes,1,opt,name=raw" json:"raw,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*StoredValue) GetRaw ¶
func (m *StoredValue) GetRaw() []byte
func (*StoredValue) Marshal ¶
func (m *StoredValue) Marshal() (data []byte, err error)
func (*StoredValue) ProtoMessage ¶
func (*StoredValue) ProtoMessage()
func (*StoredValue) Reset ¶
func (m *StoredValue) Reset()
func (*StoredValue) Size ¶
func (m *StoredValue) Size() (n int)
func (*StoredValue) String ¶
func (m *StoredValue) String() string
func (*StoredValue) Unmarshal ¶
func (m *StoredValue) Unmarshal(data []byte) error
type TermFreqRow ¶
type TermFreqRow struct {
// contains filtered or unexported fields
}
func InitTermFreqRow ¶
func InitTermFreqRow(tfr *TermFreqRow, field uint16, term []byte, docID []byte, docNum uint64, freq uint64, norm float32, termVectors []*TermVector) *TermFreqRow
func NewTermFreqRow ¶
func NewTermFreqRow(field uint16, term []byte, docID []byte, docNum uint64, freq uint64, norm float32, termVectors []*TermVector) *TermFreqRow
func NewTermFreqRowKV ¶
func NewTermFreqRowKV(key, value []byte) (*TermFreqRow, error)
func (*TermFreqRow) DictionaryRowKey ¶
func (tfr *TermFreqRow) DictionaryRowKey() []byte
func (*TermFreqRow) DictionaryRowKeySize ¶
func (tfr *TermFreqRow) DictionaryRowKeySize() int
func (*TermFreqRow) DictionaryRowKeyTo ¶
func (tfr *TermFreqRow) DictionaryRowKeyTo(buf []byte) (int, error)
func (*TermFreqRow) DocID ¶
func (tfr *TermFreqRow) DocID() []byte
func (*TermFreqRow) DocNum ¶
func (tfr *TermFreqRow) DocNum() uint64
func (*TermFreqRow) Field ¶
func (tfr *TermFreqRow) Field() uint16
func (*TermFreqRow) Freq ¶
func (tfr *TermFreqRow) Freq() uint64
func (*TermFreqRow) Key ¶
func (tfr *TermFreqRow) Key() []byte
func (*TermFreqRow) KeySize ¶
func (tfr *TermFreqRow) KeySize() int
func (*TermFreqRow) Norm ¶
func (tfr *TermFreqRow) Norm() float32
func (*TermFreqRow) ParseKey ¶
func (tfr *TermFreqRow) ParseKey(key []byte) error
func (*TermFreqRow) String ¶
func (tfr *TermFreqRow) String() string
func (*TermFreqRow) Term ¶
func (tfr *TermFreqRow) Term() []byte
func (*TermFreqRow) Value ¶
func (tfr *TermFreqRow) Value() []byte
func (*TermFreqRow) ValueSize ¶
func (tfr *TermFreqRow) ValueSize() int
func (*TermFreqRow) Vectors ¶
func (tfr *TermFreqRow) Vectors() []*TermVector
type TermFreqValue ¶
type TermFreqValue struct { Freq *uint64 `protobuf:"varint,1,req,name=freq" json:"freq,omitempty"` Norm *float32 `protobuf:"fixed32,2,opt,name=norm" json:"norm,omitempty"` Vectors []*TermVector `protobuf:"bytes,3,rep,name=vectors" json:"vectors,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*TermFreqValue) GetFreq ¶
func (m *TermFreqValue) GetFreq() uint64
func (*TermFreqValue) GetNorm ¶
func (m *TermFreqValue) GetNorm() float32
func (*TermFreqValue) GetVectors ¶
func (m *TermFreqValue) GetVectors() []*TermVector
func (*TermFreqValue) Marshal ¶
func (m *TermFreqValue) Marshal() (data []byte, err error)
func (*TermFreqValue) ProtoMessage ¶
func (*TermFreqValue) ProtoMessage()
func (*TermFreqValue) Reset ¶
func (m *TermFreqValue) Reset()
func (*TermFreqValue) Size ¶
func (m *TermFreqValue) Size() (n int)
func (*TermFreqValue) String ¶
func (m *TermFreqValue) String() string
func (*TermFreqValue) Unmarshal ¶
func (m *TermFreqValue) Unmarshal(data []byte) error
type TermVector ¶
type TermVector struct { Field *uint32 `protobuf:"varint,1,opt,name=field" json:"field,omitempty"` Pos *uint64 `protobuf:"varint,2,opt,name=pos" json:"pos,omitempty"` Start *uint64 `protobuf:"varint,3,opt,name=start" json:"start,omitempty"` End *uint64 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` ArrayPositions []uint64 `protobuf:"varint,5,rep,name=arrayPositions" json:"arrayPositions,omitempty"` XXX_unrecognized []byte `json:"-"` }
func NewTermVector ¶
func (*TermVector) GetArrayPositions ¶
func (m *TermVector) GetArrayPositions() []uint64
func (*TermVector) GetEnd ¶
func (m *TermVector) GetEnd() uint64
func (*TermVector) GetField ¶
func (m *TermVector) GetField() uint32
func (*TermVector) GetPos ¶
func (m *TermVector) GetPos() uint64
func (*TermVector) GetStart ¶
func (m *TermVector) GetStart() uint64
func (*TermVector) Marshal ¶
func (m *TermVector) Marshal() (data []byte, err error)
func (*TermVector) ProtoMessage ¶
func (*TermVector) ProtoMessage()
func (*TermVector) Reset ¶
func (m *TermVector) Reset()
func (*TermVector) Size ¶
func (m *TermVector) Size() (n int)
func (*TermVector) String ¶
func (m *TermVector) String() string
func (*TermVector) Unmarshal ¶
func (m *TermVector) Unmarshal(data []byte) error
type VersionRow ¶
type VersionRow struct {
// contains filtered or unexported fields
}
func NewVersionRow ¶
func NewVersionRow(version uint64) *VersionRow
func NewVersionRowV ¶
func NewVersionRowV(val []byte) (*VersionRow, error)
func (*VersionRow) Key ¶
func (vr *VersionRow) Key() []byte
func (*VersionRow) KeySize ¶
func (vr *VersionRow) KeySize() int
func (*VersionRow) Value ¶
func (vr *VersionRow) Value() []byte
func (*VersionRow) ValueSize ¶
func (vr *VersionRow) ValueSize() int
func (*VersionRow) Version ¶
func (vr *VersionRow) Version() uint64
type VersionValue ¶
type VersionValue struct { Version *uint64 `protobuf:"varint,1,req,name=version" json:"version,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*VersionValue) GetVersion ¶
func (m *VersionValue) GetVersion() uint64
func (*VersionValue) Marshal ¶
func (m *VersionValue) Marshal() (data []byte, err error)
func (*VersionValue) ProtoMessage ¶
func (*VersionValue) ProtoMessage()
func (*VersionValue) Reset ¶
func (m *VersionValue) Reset()
func (*VersionValue) Size ¶
func (m *VersionValue) Size() (n int)
func (*VersionValue) String ¶
func (m *VersionValue) String() string
func (*VersionValue) Unmarshal ¶
func (m *VersionValue) Unmarshal(data []byte) error
Click to show internal directories.
Click to hide internal directories.