Documentation
¶
Index ¶
- type DocLocation
- type IndexWriter
- func (s *IndexWriter) IDsTable() seqids.Table
- func (s *IndexWriter) LIDsTable() lids.Table
- func (s *IndexWriter) TokenTable() token.Table
- func (s *IndexWriter) WriteIDFile(ws io.WriteSeeker, src Source) error
- func (s *IndexWriter) WriteInfoFile(ws io.Writer, src Source) error
- func (s *IndexWriter) WriteOffsetsFile(ws io.WriteSeeker, src Source) error
- func (s *IndexWriter) WriteTokenTriplet(tws, lws io.WriteSeeker, src Source) error
- type Source
- type TokenLIDs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexWriter ¶
type IndexWriter struct {
// contains filtered or unexported fields
}
func New ¶
func New(params common.SealParams) *IndexWriter
func (*IndexWriter) IDsTable ¶
func (s *IndexWriter) IDsTable() seqids.Table
func (*IndexWriter) LIDsTable ¶
func (s *IndexWriter) LIDsTable() lids.Table
func (*IndexWriter) TokenTable ¶
func (s *IndexWriter) TokenTable() token.Table
func (*IndexWriter) WriteIDFile ¶
func (s *IndexWriter) WriteIDFile(ws io.WriteSeeker, src Source) error
func (*IndexWriter) WriteInfoFile ¶
func (s *IndexWriter) WriteInfoFile(ws io.Writer, src Source) error
func (*IndexWriter) WriteOffsetsFile ¶
func (s *IndexWriter) WriteOffsetsFile(ws io.WriteSeeker, src Source) error
WriteOffsetsFile writes the .offsets file containing a single BlockOffsets block.
func (*IndexWriter) WriteTokenTriplet ¶
func (s *IndexWriter) WriteTokenTriplet(tws, lws io.WriteSeeker, src Source) error
type Source ¶
type Source interface {
// Info returns metadata describing this source.
Info() *common.Info
// ID returns an iterator over stored document identifiers paired with
// their positions, in descending [seq.ID] order.
IDs() iter.Seq2[DocLocation, error]
// BlockOffsets returns byte offsets to each document block
// within this source's `.docs` file.
BlockOffsets() []uint64
// TokenTriplet iterates over fields in lexicographic order.
// For each field, it yields tokens (lexicographically sorted)
// paired with the local document ID list for that token.
TokenTriplets() iter.Seq2[string, iter.Seq2[TokenLIDs, error]]
}
Source defines the data required to write all index files for a fraction.
Click to show internal directories.
Click to hide internal directories.