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 Reader ¶ added in v0.15.14
type Reader interface { // Len is the number of documents contained by the reader. Len() int // Read reads a document with the given postings ID. Read(id postings.ID) (doc.Document, error) // Iter returns a document iterator. Iter() index.IDDocIterator }
Reader is a document reader from an encoded source.
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(docs []doc.Document) *SliceReader
NewSliceReader returns a new docs slice reader.
func (*SliceReader) Doc ¶ added in v0.15.0
Doc implements DocRetriever and reads the document with postings ID.
func (*SliceReader) Iter ¶ added in v0.15.14
func (r *SliceReader) Iter() index.IDDocIterator
Iter returns a docs iterator.
func (*SliceReader) Len ¶ added in v0.5.0
func (r *SliceReader) Len() int
Len returns the number of documents in the slice reader.