Documentation ¶
Index ¶
- type InvertedIndex
- func (index *InvertedIndex) Get(tokenId primitive.TokenId) *PostingList
- func (index *InvertedIndex) Insert(tokenId primitive.TokenId, value *Posting)
- func (index *InvertedIndex) Length() int
- func (index *InvertedIndex) Map(fn func(id primitive.TokenId, list *PostingList) error) error
- func (index *InvertedIndex) Push(tokenId primitive.TokenId, value *Posting)
- func (index *InvertedIndex) Set(tokenId primitive.TokenId, postingList *PostingList)
- func (index *InvertedIndex) TokenIds() []primitive.TokenId
- type Posting
- type PostingList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InvertedIndex ¶
type InvertedIndex struct {
// contains filtered or unexported fields
}
func New ¶
func New() *InvertedIndex
func (*InvertedIndex) Get ¶
func (index *InvertedIndex) Get(tokenId primitive.TokenId) *PostingList
func (*InvertedIndex) Insert ¶
func (index *InvertedIndex) Insert(tokenId primitive.TokenId, value *Posting)
func (*InvertedIndex) Length ¶
func (index *InvertedIndex) Length() int
func (*InvertedIndex) Map ¶
func (index *InvertedIndex) Map(fn func(id primitive.TokenId, list *PostingList) error) error
func (*InvertedIndex) Push ¶
func (index *InvertedIndex) Push(tokenId primitive.TokenId, value *Posting)
func (*InvertedIndex) Set ¶
func (index *InvertedIndex) Set(tokenId primitive.TokenId, postingList *PostingList)
func (*InvertedIndex) TokenIds ¶
func (index *InvertedIndex) TokenIds() []primitive.TokenId
type Posting ¶
type Posting struct {
// contains filtered or unexported fields
}
func NewPosting ¶
func NewPosting(docId primitive.DocumentId, positions []int) *Posting
func (*Posting) DocumentId ¶
func (p *Posting) DocumentId() primitive.DocumentId
type PostingList ¶
type PostingList struct {
// contains filtered or unexported fields
}
func DecodePostingList ¶
func DecodePostingList(blob []byte) *PostingList
func (*PostingList) CheckCorruption ¶
func (p *PostingList) CheckCorruption() error
func (*PostingList) Count ¶
func (p *PostingList) Count() int
func (*PostingList) Encode ¶
func (p *PostingList) Encode(isReverse bool) []byte
func (*PostingList) Map ¶
func (p *PostingList) Map(fn func(primitive.DocumentId, []int) error) error
func (*PostingList) Posting ¶
func (p *PostingList) Posting() *Posting
Click to show internal directories.
Click to hide internal directories.