Documentation ¶
Index ¶
- Constants
- Variables
- func DeleteUncompactedPostings(root string) error
- func InvertedReadRaw(root string, maxDocuments int32, tagKey, tagValue string) []int32
- func ParseFile(fd *os.File, off uint32) (uint32, map[string]uint32, error)
- func ReadAllTermsInSegment(root string) (map[string][]uint32, error)
- func WriteCompactedIndex(root string, segment map[string][]uint32) error
- type CompactIndexCache
- type ForwardWriter
- func (fw *ForwardWriter) Append(encoded []byte) (uint32, error)
- func (fw *ForwardWriter) Close() error
- func (fw *ForwardWriter) Offset() uint32
- func (fw *ForwardWriter) Read(offset uint32) ([]byte, uint32, error)
- func (fw *ForwardWriter) Scan(offset uint32, cb func(uint32, []byte) error) error
- func (fw *ForwardWriter) Size() (uint32, error)
- func (fw *ForwardWriter) Sync() error
- type InvertedWriter
- type PersistedDictionary
Constants ¶
View Source
const PAD = 64
Variables ¶
View Source
var EBADRQC = errors.New("bad length")
View Source
var EBADSLT = errors.New("checksum mismatch")
Functions ¶
func InvertedReadRaw ¶
Types ¶
type CompactIndexCache ¶
func NewCompactIndexCache ¶
func NewCompactIndexCache() *CompactIndexCache
func (*CompactIndexCache) FindPostingsList ¶
func (c *CompactIndexCache) FindPostingsList(root, k, v string) []int32
type ForwardWriter ¶
type ForwardWriter struct {
// contains filtered or unexported fields
}
func NewForwardWriter ¶
func NewForwardWriter(root string, name string) (*ForwardWriter, error)
func (*ForwardWriter) Close ¶
func (fw *ForwardWriter) Close() error
func (*ForwardWriter) Offset ¶
func (fw *ForwardWriter) Offset() uint32
func (*ForwardWriter) Size ¶
func (fw *ForwardWriter) Size() (uint32, error)
func (*ForwardWriter) Sync ¶
func (fw *ForwardWriter) Sync() error
type InvertedWriter ¶
type InvertedWriter struct {
// contains filtered or unexported fields
}
func NewInvertedWriter ¶
func NewInvertedWriter(maxOpenDescriptors int) (*InvertedWriter, error)
func (*InvertedWriter) Append ¶
func (fw *InvertedWriter) Append(root string, docId int32, tagKey, tagValue string) error
func (*InvertedWriter) Close ¶
func (fw *InvertedWriter) Close()
func (*InvertedWriter) Size ¶
func (fw *InvertedWriter) Size(root, tagKey, tagValue string) int32
type PersistedDictionary ¶
func NewPersistedDictionary ¶
func NewPersistedDictionary(root string) (*PersistedDictionary, error)
func (*PersistedDictionary) Close ¶
func (pd *PersistedDictionary) Close()
func (*PersistedDictionary) GetUniqueTerm ¶
func (pd *PersistedDictionary) GetUniqueTerm(s string) (uint32, error)
func (*PersistedDictionary) Resolve ¶
func (pd *PersistedDictionary) Resolve(s string) (uint32, bool)
func (*PersistedDictionary) ReverseResolve ¶
func (pd *PersistedDictionary) ReverseResolve(s uint32) string
Click to show internal directories.
Click to hide internal directories.