Documentation ¶
Index ¶
- type Indexer
- func (indexer *Indexer) AddDocument(document *types.DocumentIndex)
- func (indexer *Indexer) Init(options types.IndexerInitOptions)
- func (indexer *Indexer) Lookup(tokens []string, labels []string, docIds map[string]bool, countDocsOnly bool) (docs []types.IndexedDocument, numDocs int)
- func (indexer *Indexer) RemoveDoc(docId string)
- type KeywordIndices
- type Ranker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Indexer ¶
type Indexer struct {
// contains filtered or unexported fields
}
索引器
func (*Indexer) AddDocument ¶
func (indexer *Indexer) AddDocument(document *types.DocumentIndex)
向反向索引表中加入一个文档
type KeywordIndices ¶
type KeywordIndices struct {
// contains filtered or unexported fields
}
反向索引表的一行,收集了一个搜索键出现的所有文档,按照DocId从小到大排序。
type Ranker ¶
type Ranker struct {
// contains filtered or unexported fields
}
func (*Ranker) Rank ¶
func (ranker *Ranker) Rank( docs []types.IndexedDocument, options types.RankOptions, countDocsOnly bool) (types.ScoredDocuments, int)
给文档评分并排序
Click to show internal directories.
Click to hide internal directories.