upside_down

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2016 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation ¶

Overview ¶

Package upside_down is a generated protocol buffer package.

It is generated from these files:

upside_down.proto

It has these top-level messages:

BackIndexTermEntry
BackIndexStoreEntry
BackIndexRowValue

Index ¶

Constants ¶

View Source
const ByteSeparator byte = 0xff
View Source
const DictionaryRowMaxValueSize = binary.MaxVarintLen64
View Source
const Name = "upside_down"
View Source
const RowBufferSize = 4 * 1024

RowBufferSize should ideally this is sized to be the smallest size that can contain an index row key and its corresponding value. It is not a limit, if need be a larger buffer is allocated, but performance will be more optimal if *most* rows fit this size.

View Source
const Version uint8 = 5

Variables ¶

View Source
var (
	ErrInvalidLengthUpsideDown = fmt.Errorf("proto: negative length found during unmarshaling")
)
View Source
var IncompatibleVersion = fmt.Errorf("incompatible version, %d is supported", Version)
View Source
var UnsafeBatchUseDetected = fmt.Errorf("bleve.Batch is NOT thread-safe, modification after execution detected")
View Source
var VersionKey = []byte{'v'}

Functions ¶

func GetRowBuffer ¶

func GetRowBuffer() []byte

func NewUpsideDownCouch ¶

func NewUpsideDownCouch(storeName string, storeConfig map[string]interface{}, analysisQueue *index.AnalysisQueue) (index.Index, error)

func PutRowBuffer ¶

func PutRowBuffer(buf []byte)

Types ¶

type BackIndexRow ¶

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

func NewBackIndexRow ¶

func NewBackIndexRow(docID []byte, entries []*BackIndexTermEntry, storedFields []*BackIndexStoreEntry) *BackIndexRow

func NewBackIndexRowKV ¶

func NewBackIndexRowKV(key, value []byte) (*BackIndexRow, error)

func (*BackIndexRow) AllStoredKeys ¶

func (br *BackIndexRow) AllStoredKeys() [][]byte

func (*BackIndexRow) AllTermKeys ¶

func (br *BackIndexRow) AllTermKeys() [][]byte

func (*BackIndexRow) Key ¶

func (br *BackIndexRow) Key() []byte

func (*BackIndexRow) KeySize ¶

func (br *BackIndexRow) KeySize() int

func (*BackIndexRow) KeyTo ¶

func (br *BackIndexRow) KeyTo(buf []byte) (int, error)

func (*BackIndexRow) String ¶

func (br *BackIndexRow) String() string

func (*BackIndexRow) Value ¶

func (br *BackIndexRow) Value() []byte

func (*BackIndexRow) ValueSize ¶

func (br *BackIndexRow) ValueSize() int

func (*BackIndexRow) ValueTo ¶

func (br *BackIndexRow) ValueTo(buf []byte) (int, error)

type BackIndexRowValue ¶

type BackIndexRowValue struct {
	TermEntries      []*BackIndexTermEntry  `protobuf:"bytes,1,rep,name=termEntries" json:"termEntries,omitempty"`
	StoredEntries    []*BackIndexStoreEntry `protobuf:"bytes,2,rep,name=storedEntries" json:"storedEntries,omitempty"`
	XXX_unrecognized []byte                 `json:"-"`
}

func (*BackIndexRowValue) GetStoredEntries ¶

func (m *BackIndexRowValue) GetStoredEntries() []*BackIndexStoreEntry

func (*BackIndexRowValue) GetTermEntries ¶

func (m *BackIndexRowValue) GetTermEntries() []*BackIndexTermEntry

func (*BackIndexRowValue) Marshal ¶

func (m *BackIndexRowValue) Marshal() (data []byte, err error)

func (*BackIndexRowValue) MarshalTo ¶

func (m *BackIndexRowValue) MarshalTo(data []byte) (n int, err error)

func (*BackIndexRowValue) ProtoMessage ¶

func (*BackIndexRowValue) ProtoMessage()

func (*BackIndexRowValue) Reset ¶

func (m *BackIndexRowValue) Reset()

func (*BackIndexRowValue) Size ¶

func (m *BackIndexRowValue) Size() (n int)

func (*BackIndexRowValue) String ¶

func (m *BackIndexRowValue) String() string

func (*BackIndexRowValue) Unmarshal ¶

func (m *BackIndexRowValue) Unmarshal(data []byte) error

type BackIndexStoreEntry ¶

type BackIndexStoreEntry struct {
	Field            *uint32  `protobuf:"varint,1,req,name=field" json:"field,omitempty"`
	ArrayPositions   []uint64 `protobuf:"varint,2,rep,name=arrayPositions" json:"arrayPositions,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*BackIndexStoreEntry) GetArrayPositions ¶

func (m *BackIndexStoreEntry) GetArrayPositions() []uint64

func (*BackIndexStoreEntry) GetField ¶

func (m *BackIndexStoreEntry) GetField() uint32

func (*BackIndexStoreEntry) Marshal ¶

func (m *BackIndexStoreEntry) Marshal() (data []byte, err error)

func (*BackIndexStoreEntry) MarshalTo ¶

func (m *BackIndexStoreEntry) MarshalTo(data []byte) (n int, err error)

func (*BackIndexStoreEntry) ProtoMessage ¶

func (*BackIndexStoreEntry) ProtoMessage()

func (*BackIndexStoreEntry) Reset ¶

func (m *BackIndexStoreEntry) Reset()

func (*BackIndexStoreEntry) Size ¶

func (m *BackIndexStoreEntry) Size() (n int)

func (*BackIndexStoreEntry) String ¶

func (m *BackIndexStoreEntry) String() string

func (*BackIndexStoreEntry) Unmarshal ¶

func (m *BackIndexStoreEntry) Unmarshal(data []byte) error

type BackIndexTermEntry ¶

type BackIndexTermEntry struct {
	Term             *string `protobuf:"bytes,1,req,name=term" json:"term,omitempty"`
	Field            *uint32 `protobuf:"varint,2,req,name=field" json:"field,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*BackIndexTermEntry) GetField ¶

func (m *BackIndexTermEntry) GetField() uint32

func (*BackIndexTermEntry) GetTerm ¶

func (m *BackIndexTermEntry) GetTerm() string

func (*BackIndexTermEntry) Marshal ¶

func (m *BackIndexTermEntry) Marshal() (data []byte, err error)

func (*BackIndexTermEntry) MarshalTo ¶

func (m *BackIndexTermEntry) MarshalTo(data []byte) (n int, err error)

func (*BackIndexTermEntry) ProtoMessage ¶

func (*BackIndexTermEntry) ProtoMessage()

func (*BackIndexTermEntry) Reset ¶

func (m *BackIndexTermEntry) Reset()

func (*BackIndexTermEntry) Size ¶

func (m *BackIndexTermEntry) Size() (n int)

func (*BackIndexTermEntry) String ¶

func (m *BackIndexTermEntry) String() string

func (*BackIndexTermEntry) Unmarshal ¶

func (m *BackIndexTermEntry) Unmarshal(data []byte) error

type DictionaryRow ¶

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

func NewDictionaryRow ¶

func NewDictionaryRow(term []byte, field uint16, count uint64) *DictionaryRow

func NewDictionaryRowK ¶

func NewDictionaryRowK(key []byte) (*DictionaryRow, error)

func NewDictionaryRowKV ¶

func NewDictionaryRowKV(key, value []byte) (*DictionaryRow, error)

func (*DictionaryRow) Key ¶

func (dr *DictionaryRow) Key() []byte

func (*DictionaryRow) KeySize ¶

func (dr *DictionaryRow) KeySize() int

func (*DictionaryRow) KeyTo ¶

func (dr *DictionaryRow) KeyTo(buf []byte) (int, error)

func (*DictionaryRow) String ¶

func (dr *DictionaryRow) String() string

func (*DictionaryRow) Value ¶

func (dr *DictionaryRow) Value() []byte

func (*DictionaryRow) ValueSize ¶

func (dr *DictionaryRow) ValueSize() int

func (*DictionaryRow) ValueTo ¶

func (dr *DictionaryRow) ValueTo(buf []byte) (int, error)

type FieldRow ¶

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

func NewFieldRow ¶

func NewFieldRow(index uint16, name string) *FieldRow

func NewFieldRowKV ¶

func NewFieldRowKV(key, value []byte) (*FieldRow, error)

func (*FieldRow) Key ¶

func (f *FieldRow) Key() []byte

func (*FieldRow) KeySize ¶

func (f *FieldRow) KeySize() int

func (*FieldRow) KeyTo ¶

func (f *FieldRow) KeyTo(buf []byte) (int, error)

func (*FieldRow) String ¶

func (f *FieldRow) String() string

func (*FieldRow) Value ¶

func (f *FieldRow) Value() []byte

func (*FieldRow) ValueSize ¶

func (f *FieldRow) ValueSize() int

func (*FieldRow) ValueTo ¶

func (f *FieldRow) ValueTo(buf []byte) (int, error)

type IndexReader ¶

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

func (*IndexReader) Close ¶

func (i *IndexReader) Close() error

func (*IndexReader) DocCount ¶

func (i *IndexReader) DocCount() uint64

func (*IndexReader) DocIDReader ¶

func (i *IndexReader) DocIDReader(start, end string) (index.DocIDReader, error)

func (*IndexReader) Document ¶

func (i *IndexReader) Document(id string) (doc *document.Document, err error)

func (*IndexReader) DocumentFieldTerms ¶

func (i *IndexReader) DocumentFieldTerms(id string) (index.FieldTerms, error)

func (*IndexReader) FieldDict ¶

func (i *IndexReader) FieldDict(fieldName string) (index.FieldDict, error)

func (*IndexReader) FieldDictPrefix ¶

func (i *IndexReader) FieldDictPrefix(fieldName string, termPrefix []byte) (index.FieldDict, error)

func (*IndexReader) FieldDictRange ¶

func (i *IndexReader) FieldDictRange(fieldName string, startTerm []byte, endTerm []byte) (index.FieldDict, error)

func (*IndexReader) Fields ¶

func (i *IndexReader) Fields() (fields []string, err error)

func (*IndexReader) GetInternal ¶

func (i *IndexReader) GetInternal(key []byte) ([]byte, error)

func (*IndexReader) TermFieldReader ¶

func (i *IndexReader) TermFieldReader(term []byte, fieldName string) (index.TermFieldReader, error)

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 (i *InternalRow) Key() []byte

func (*InternalRow) KeySize ¶

func (i *InternalRow) KeySize() int

func (*InternalRow) KeyTo ¶

func (i *InternalRow) KeyTo(buf []byte) (int, error)

func (*InternalRow) String ¶

func (i *InternalRow) String() string

func (*InternalRow) Value ¶

func (i *InternalRow) Value() []byte

func (*InternalRow) ValueSize ¶

func (i *InternalRow) ValueSize() int

func (*InternalRow) ValueTo ¶

func (i *InternalRow) ValueTo(buf []byte) (int, error)

type StoredRow ¶

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

func NewStoredRow ¶

func NewStoredRow(docID []byte, field uint16, arrayPositions []uint64, typ byte, value []byte) *StoredRow

func NewStoredRowK ¶

func NewStoredRowK(key []byte) (*StoredRow, error)

func NewStoredRowKV ¶

func NewStoredRowKV(key, value []byte) (*StoredRow, error)

func (*StoredRow) Key ¶

func (s *StoredRow) Key() []byte

func (*StoredRow) KeySize ¶

func (s *StoredRow) KeySize() int

func (*StoredRow) KeyTo ¶

func (s *StoredRow) KeyTo(buf []byte) (int, error)

func (*StoredRow) ScanPrefixForDoc ¶

func (s *StoredRow) ScanPrefixForDoc() []byte

func (*StoredRow) String ¶

func (s *StoredRow) String() string

func (*StoredRow) Value ¶

func (s *StoredRow) Value() []byte

func (*StoredRow) ValueSize ¶

func (s *StoredRow) ValueSize() int

func (*StoredRow) ValueTo ¶

func (s *StoredRow) ValueTo(buf []byte) (int, error)

type TermFrequencyRow ¶

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

func NewTermFrequencyRow ¶

func NewTermFrequencyRow(term []byte, field uint16, docID []byte, freq uint64, norm float32) *TermFrequencyRow

func NewTermFrequencyRowK ¶

func NewTermFrequencyRowK(key []byte) (*TermFrequencyRow, error)

func NewTermFrequencyRowKV ¶

func NewTermFrequencyRowKV(key, value []byte) (*TermFrequencyRow, error)

func NewTermFrequencyRowWithTermVectors ¶

func NewTermFrequencyRowWithTermVectors(term []byte, field uint16, docID []byte, freq uint64, norm float32, vectors []*TermVector) *TermFrequencyRow

func (*TermFrequencyRow) DictionaryRowKey ¶

func (tfr *TermFrequencyRow) DictionaryRowKey() []byte

func (*TermFrequencyRow) DictionaryRowKeySize ¶

func (tfr *TermFrequencyRow) DictionaryRowKeySize() int

func (*TermFrequencyRow) DictionaryRowKeyTo ¶

func (tfr *TermFrequencyRow) DictionaryRowKeyTo(buf []byte) (int, error)

func (*TermFrequencyRow) Freq ¶

func (tfr *TermFrequencyRow) Freq() uint64

func (*TermFrequencyRow) Key ¶

func (tfr *TermFrequencyRow) Key() []byte

func (*TermFrequencyRow) KeySize ¶

func (tfr *TermFrequencyRow) KeySize() int

func (*TermFrequencyRow) KeyTo ¶

func (tfr *TermFrequencyRow) KeyTo(buf []byte) (int, error)

func (*TermFrequencyRow) ScanPrefixForField ¶

func (tfr *TermFrequencyRow) ScanPrefixForField() []byte

func (*TermFrequencyRow) ScanPrefixForFieldTerm ¶

func (tfr *TermFrequencyRow) ScanPrefixForFieldTerm() []byte

func (*TermFrequencyRow) ScanPrefixForFieldTermPrefix ¶

func (tfr *TermFrequencyRow) ScanPrefixForFieldTermPrefix() []byte

func (*TermFrequencyRow) String ¶

func (tfr *TermFrequencyRow) String() string

func (*TermFrequencyRow) Term ¶

func (tfr *TermFrequencyRow) Term() []byte

func (*TermFrequencyRow) Value ¶

func (tfr *TermFrequencyRow) Value() []byte

func (*TermFrequencyRow) ValueSize ¶

func (tfr *TermFrequencyRow) ValueSize() int

func (*TermFrequencyRow) ValueTo ¶

func (tfr *TermFrequencyRow) ValueTo(buf []byte) (int, error)

type TermVector ¶

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

func (*TermVector) String ¶

func (tv *TermVector) String() string

type UpsideDownCouch ¶

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

func (*UpsideDownCouch) Advanced ¶

func (udc *UpsideDownCouch) Advanced() (store.KVStore, error)

func (*UpsideDownCouch) Analyze ¶

func (*UpsideDownCouch) Batch ¶

func (udc *UpsideDownCouch) Batch(batch *index.Batch) (err error)

func (*UpsideDownCouch) Close ¶

func (udc *UpsideDownCouch) Close() error

func (*UpsideDownCouch) Delete ¶

func (udc *UpsideDownCouch) Delete(id string) (err error)

func (*UpsideDownCouch) DeleteInternal ¶

func (udc *UpsideDownCouch) DeleteInternal(key []byte) (err error)

func (*UpsideDownCouch) DocCount ¶

func (udc *UpsideDownCouch) DocCount() (uint64, error)

func (*UpsideDownCouch) DumpAll ¶

func (udc *UpsideDownCouch) DumpAll() chan interface{}

func (*UpsideDownCouch) DumpDoc ¶

func (udc *UpsideDownCouch) DumpDoc(id string) chan interface{}

DumpDoc returns all rows in the index related to this doc id

func (*UpsideDownCouch) DumpFields ¶

func (udc *UpsideDownCouch) DumpFields() chan interface{}

func (*UpsideDownCouch) Open ¶

func (udc *UpsideDownCouch) Open() (err error)

func (*UpsideDownCouch) Reader ¶

func (udc *UpsideDownCouch) Reader() (index.IndexReader, error)

func (*UpsideDownCouch) SetInternal ¶

func (udc *UpsideDownCouch) SetInternal(key, val []byte) (err error)

func (*UpsideDownCouch) Stats ¶

func (udc *UpsideDownCouch) Stats() json.Marshaler

func (*UpsideDownCouch) StatsMap ¶

func (udc *UpsideDownCouch) StatsMap() map[string]interface{}

func (*UpsideDownCouch) Update ¶

func (udc *UpsideDownCouch) Update(doc *document.Document) (err error)

type UpsideDownCouchDocIDReader ¶

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

func (*UpsideDownCouchDocIDReader) Advance ¶

func (r *UpsideDownCouchDocIDReader) Advance(docID string) (string, error)

func (*UpsideDownCouchDocIDReader) Close ¶

func (r *UpsideDownCouchDocIDReader) Close() error

func (*UpsideDownCouchDocIDReader) Next ¶

type UpsideDownCouchFieldDict ¶

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

func (*UpsideDownCouchFieldDict) Close ¶

func (r *UpsideDownCouchFieldDict) Close() error

func (*UpsideDownCouchFieldDict) Next ¶

type UpsideDownCouchRow ¶

type UpsideDownCouchRow interface {
	KeySize() int
	KeyTo([]byte) (int, error)
	Key() []byte
	Value() []byte
	ValueSize() int
	ValueTo([]byte) (int, error)
}

func ParseFromKeyValue ¶

func ParseFromKeyValue(key, value []byte) (UpsideDownCouchRow, error)

type UpsideDownCouchRowStream ¶

type UpsideDownCouchRowStream chan UpsideDownCouchRow

type UpsideDownCouchTermFieldReader ¶

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

func (*UpsideDownCouchTermFieldReader) Advance ¶

func (*UpsideDownCouchTermFieldReader) Close ¶

func (*UpsideDownCouchTermFieldReader) Count ¶

func (*UpsideDownCouchTermFieldReader) Next ¶

type VersionRow ¶

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

func NewVersionRow ¶

func NewVersionRow(version uint8) *VersionRow

func NewVersionRowKV ¶

func NewVersionRowKV(key, value []byte) (*VersionRow, error)

func (*VersionRow) Key ¶

func (v *VersionRow) Key() []byte

func (*VersionRow) KeySize ¶

func (v *VersionRow) KeySize() int

func (*VersionRow) KeyTo ¶

func (v *VersionRow) KeyTo(buf []byte) (int, error)

func (*VersionRow) String ¶

func (v *VersionRow) String() string

func (*VersionRow) Value ¶

func (v *VersionRow) Value() []byte

func (*VersionRow) ValueSize ¶

func (v *VersionRow) ValueSize() int

func (*VersionRow) ValueTo ¶

func (v *VersionRow) ValueTo(buf []byte) (int, error)

Jump to

Keyboard shortcuts

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