Documentation ¶
Index ¶
- func SaveMeta(meta *IndexMeta, dir directory.Directory) error
- func SeekDocSet(docSet DocSet, target schema.DocID) schema.DocID
- type Builder
- type DeleteMeta
- type DocAddress
- type DocSet
- type Document
- type Index
- func (i *Index) Directory() directory.Directory
- func (i *Index) LoadMeta() (*IndexMeta, error)
- func (i *Index) NewSegment() *Segment
- func (i *Index) NewSegmentMeta(segmentID SegmentID, maxDoc schema.DocID) *SegmentMeta
- func (i *Index) Schema() *schema.Schema
- func (i *Index) SearchableSegments() ([]*Segment, error)
- func (i *Index) Segment(segmentMeta *SegmentMeta) *Segment
- type IndexMeta
- type Segment
- func (s *Segment) Meta() *SegmentMeta
- func (s *Segment) OpenRead(component SegmentComponent) (*directory.FileSlice, error)
- func (s *Segment) OpenWrite(component SegmentComponent) (directory.WriteCloseSyncer, error)
- func (s *Segment) Schema() *schema.Schema
- func (s *Segment) WithMaxDoc(maxDoc schema.DocID) *Segment
- type SegmentComponent
- type SegmentID
- type SegmentMeta
- type SegmentMetaInventory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DeleteMeta ¶
type DocAddress ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
func NewIndexFromMeta ¶
func NewIndexFromMeta(directory directory.Directory, meta *IndexMeta, inventory *SegmentMetaInventory) *Index
func (*Index) NewSegment ¶
func (*Index) NewSegmentMeta ¶
func (i *Index) NewSegmentMeta(segmentID SegmentID, maxDoc schema.DocID) *SegmentMeta
func (*Index) SearchableSegments ¶
func (*Index) Segment ¶
func (i *Index) Segment(segmentMeta *SegmentMeta) *Segment
type IndexMeta ¶
type IndexMeta struct { Segments []*SegmentMeta `json:"segments"` Schema *schema.Schema `json:"schema"` // last commit operation's id Opstamp opstamp.OpStamp `json:"opstamp"` }
func LoadMeta ¶
func LoadMeta(directory directory.Directory, inventory *SegmentMetaInventory) (*IndexMeta, error)
func NewIndexMeta ¶
type Segment ¶
type Segment struct { Index *Index // contains filtered or unexported fields }
func (*Segment) Meta ¶
func (s *Segment) Meta() *SegmentMeta
func (*Segment) OpenRead ¶
func (s *Segment) OpenRead(component SegmentComponent) (*directory.FileSlice, error)
func (*Segment) OpenWrite ¶
func (s *Segment) OpenWrite(component SegmentComponent) (directory.WriteCloseSyncer, error)
type SegmentComponent ¶
type SegmentComponent int
const ( SegmentComponentPostings SegmentComponent = iota + 1 SegmentComponentTerms SegmentComponentStore SegmentComponentDelete )
type SegmentMeta ¶
type SegmentMeta struct { SegmentID SegmentID `json:"segmentId"` MaxDoc schema.DocID `json:"maxDoc"` Deletes *DeleteMeta `json:"deletes"` }
func (*SegmentMeta) DocNum ¶
func (s *SegmentMeta) DocNum() uint32
func (*SegmentMeta) RelativePath ¶
func (s *SegmentMeta) RelativePath(component SegmentComponent) string
func (*SegmentMeta) WithMaxDoc ¶
func (s *SegmentMeta) WithMaxDoc(maxDoc schema.DocID) *SegmentMeta
type SegmentMetaInventory ¶
type SegmentMetaInventory struct {
// contains filtered or unexported fields
}
func (*SegmentMetaInventory) NewSegmentMeta ¶
func (i *SegmentMetaInventory) NewSegmentMeta(segmentID SegmentID, maxDoc schema.DocID) *SegmentMeta
Click to show internal directories.
Click to hide internal directories.