upside_down

package
v0.0.0-...-27f001b Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2014 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright (c) 2014 Couchbase, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions
and limitations under the License.

Copyright (c) 2014 Couchbase, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions
and limitations under the License.

Copyright (c) 2014 Couchbase, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions
and limitations under the License.

Copyright (c) 2014 Couchbase, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions
and limitations under the License.

Copyright (c) 2014 Couchbase, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions
and limitations under the License.

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 BYTE_SEPARATOR byte = 0xff
View Source
const VERSION uint8 = 1

Variables

View Source
var VERSION_KEY []byte = []byte{'v'}

Functions

This section is empty.

Types

type BackIndexRow

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

func NewBackIndexRow

func NewBackIndexRow(doc string, 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) String

func (br *BackIndexRow) String() string

func (*BackIndexRow) Value

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

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) ProtoMessage

func (*BackIndexRowValue) ProtoMessage()

func (*BackIndexRowValue) Reset

func (m *BackIndexRowValue) Reset()

func (*BackIndexRowValue) String

func (m *BackIndexRowValue) String() string

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) ProtoMessage

func (*BackIndexStoreEntry) ProtoMessage()

func (*BackIndexStoreEntry) Reset

func (m *BackIndexStoreEntry) Reset()

func (*BackIndexStoreEntry) String

func (m *BackIndexStoreEntry) String() string

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) ProtoMessage

func (*BackIndexTermEntry) ProtoMessage()

func (*BackIndexTermEntry) Reset

func (m *BackIndexTermEntry) Reset()

func (*BackIndexTermEntry) String

func (m *BackIndexTermEntry) String() string

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) String

func (f *FieldRow) String() string

func (*FieldRow) Value

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

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) String

func (i *InternalRow) String() string

func (*InternalRow) Value

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

type StoredRow

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

func NewStoredRow

func NewStoredRow(doc string, 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) ScanPrefixForDoc

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

func (*StoredRow) String

func (s *StoredRow) String() string

func (*StoredRow) Value

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

type TermFrequencyRow

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

func NewTermFrequencyRow

func NewTermFrequencyRow(term []byte, field uint16, doc string, 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, doc string, freq uint64, norm float32, vectors []*TermVector) *TermFrequencyRow

func (*TermFrequencyRow) Key

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

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) Value

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

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 NewUpsideDownCouch

func NewUpsideDownCouch(s store.KVStore) *UpsideDownCouch

func (*UpsideDownCouch) Batch

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

func (*UpsideDownCouch) Close

func (udc *UpsideDownCouch) Close()

func (*UpsideDownCouch) Delete

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

func (*UpsideDownCouch) DeleteInternal

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

func (*UpsideDownCouch) DocCount

func (udc *UpsideDownCouch) DocCount() uint64

func (*UpsideDownCouch) DocIdReader

func (udc *UpsideDownCouch) DocIdReader(start, end string) (index.DocIdReader, error)

func (*UpsideDownCouch) Document

func (udc *UpsideDownCouch) Document(id string) (*document.Document, error)

func (*UpsideDownCouch) DocumentFieldTerms

func (udc *UpsideDownCouch) DocumentFieldTerms(id string) (index.FieldTerms, 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) FieldReader

func (udc *UpsideDownCouch) FieldReader(fieldName string, startTerm []byte, endTerm []byte) (index.FieldReader, error)

func (*UpsideDownCouch) Fields

func (udc *UpsideDownCouch) Fields() ([]string, error)

func (*UpsideDownCouch) GetInternal

func (udc *UpsideDownCouch) GetInternal(key []byte) ([]byte, error)

func (*UpsideDownCouch) Open

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

func (*UpsideDownCouch) SetInternal

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

func (*UpsideDownCouch) TermFieldReader

func (udc *UpsideDownCouch) TermFieldReader(term []byte, fieldName string) (index.TermFieldReader, error)

func (*UpsideDownCouch) Update

func (udc *UpsideDownCouch) Update(doc *document.Document) 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()

func (*UpsideDownCouchDocIdReader) Next

type UpsideDownCouchFieldReader

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

func (*UpsideDownCouchFieldReader) Close

func (r *UpsideDownCouchFieldReader) Close()

func (*UpsideDownCouchFieldReader) Next

type UpsideDownCouchRow

type UpsideDownCouchRow interface {
	Key() []byte
	Value() []byte
}

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 (r *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) String

func (v *VersionRow) String() string

func (*VersionRow) Value

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

Jump to

Keyboard shortcuts

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