Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataReader ¶
type DataReader struct {
// contains filtered or unexported fields
}
DataReader is a reader for the data file for documents.
func NewDataReader ¶
func NewDataReader(data []byte) *DataReader
NewDataReader returns a new DataReader.
type DataWriter ¶
type DataWriter struct {
// contains filtered or unexported fields
}
DataWriter writes the data file for documents.
func NewDataWriter ¶
func NewDataWriter(w io.Writer) *DataWriter
NewDataWriter returns a new DataWriter.
type IndexReader ¶
type IndexReader struct {
// contains filtered or unexported fields
}
IndexReader is a reader for the index file for documents.
func NewIndexReader ¶
func NewIndexReader(data []byte) (*IndexReader, error)
NewIndexReader returns a new IndexReader.
func (*IndexReader) Base ¶
func (r *IndexReader) Base() postings.ID
Base returns the base postings ID.
type IndexWriter ¶
type IndexWriter struct {
// contains filtered or unexported fields
}
IndexWriter is a writer for the index file for documents.
func NewIndexWriter ¶
func NewIndexWriter(w io.Writer) *IndexWriter
NewIndexWriter returns a new IndexWriter.
type SliceReader ¶ added in v0.5.0
type SliceReader struct {
// contains filtered or unexported fields
}
SliceReader is a docs slice reader for use with documents stored in memory.
func NewSliceReader ¶ added in v0.5.0
func NewSliceReader(offset postings.ID, docs []doc.Document) *SliceReader
NewSliceReader returns a new docs slice reader.
func (*SliceReader) AllDocs ¶ added in v0.15.0
func (r *SliceReader) AllDocs() index.IDDocIterator
AllDocs returns a docs iterator.
func (*SliceReader) Base ¶ added in v0.5.0
func (r *SliceReader) Base() postings.ID
Base returns the postings ID base offset of the slice reader.
func (*SliceReader) Doc ¶ added in v0.15.0
Doc implements DocRetriever and reads the document with postings ID.
func (*SliceReader) Len ¶ added in v0.5.0
func (r *SliceReader) Len() int
Len returns the number of documents in the slice reader.