Documentation
¶
Index ¶
- Constants
- type IndexRepository
- func (ir *IndexRepository) FlushAll()
- func (ir *IndexRepository) GetAllDocuments() ([]*model.Document, error)
- func (ir *IndexRepository) GetDocumentByID(docID [32]byte) (*model.Document, error)
- func (ir *IndexRepository) GetDocumentsByWord(word string) (map[[32]byte]model.WordCountAndPositions, error)
- func (ir *IndexRepository) GetDocumentsCount() (int, error)
- func (ir *IndexRepository) GetFreq(l, r uint64) (int, error)
- func (ir *IndexRepository) GetPageUrlsByHash(hash [32]byte) ([]byte, error)
- func (ir *IndexRepository) GetSimilarSignatures(signature [128]uint64) ([][128]uint64, error)
- func (ir *IndexRepository) GetWordsByNGram(word string, n int) ([]string, error)
- func (ir *IndexRepository) IndexDocShingles(signature [128]uint64) error
- func (ir *IndexRepository) IndexDocumentWords(docID [32]byte, sequence map[string]int, pos map[string][]model.Position) error
- func (ir *IndexRepository) IndexNGrams(words []string, n int) error
- func (ir *IndexRepository) IndexUrlsByHash(hash [32]byte, urlsStruct []byte) error
- func (ir *IndexRepository) LoadVisitedUrls(visitedURLs *sync.Map) error
- func (ir *IndexRepository) SaveDocument(doc *model.Document) error
- func (ir *IndexRepository) SaveSaltArrays(a, b [128]uint64) error
- func (ir *IndexRepository) SaveVisitedUrls(visitedURLs *sync.Map) error
- func (ir *IndexRepository) UpdateBiFreq(biS map[[2]uint64]int) error
- func (ir *IndexRepository) UpdateChunkingCounts() error
- func (ir *IndexRepository) UploadSaltArrays() ([128]uint64, [128]uint64, error)
Constants ¶
View Source
const ( DocumentKeyPrefix = "doc:%s" WordDocumentKeyFormat = "ri:%s_%x" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexRepository ¶
func NewIndexRepository ¶
func (*IndexRepository) FlushAll ¶
func (ir *IndexRepository) FlushAll()
func (*IndexRepository) GetAllDocuments ¶
func (ir *IndexRepository) GetAllDocuments() ([]*model.Document, error)
func (*IndexRepository) GetDocumentByID ¶
func (ir *IndexRepository) GetDocumentByID(docID [32]byte) (*model.Document, error)
func (*IndexRepository) GetDocumentsByWord ¶
func (ir *IndexRepository) GetDocumentsByWord(word string) (map[[32]byte]model.WordCountAndPositions, error)
func (*IndexRepository) GetDocumentsCount ¶
func (ir *IndexRepository) GetDocumentsCount() (int, error)
func (*IndexRepository) GetPageUrlsByHash ¶
func (ir *IndexRepository) GetPageUrlsByHash(hash [32]byte) ([]byte, error)
func (*IndexRepository) GetSimilarSignatures ¶
func (ir *IndexRepository) GetSimilarSignatures(signature [128]uint64) ([][128]uint64, error)
func (*IndexRepository) GetWordsByNGram ¶
func (ir *IndexRepository) GetWordsByNGram(word string, n int) ([]string, error)
func (*IndexRepository) IndexDocShingles ¶
func (ir *IndexRepository) IndexDocShingles(signature [128]uint64) error
func (*IndexRepository) IndexDocumentWords ¶
func (*IndexRepository) IndexNGrams ¶
func (ir *IndexRepository) IndexNGrams(words []string, n int) error
func (*IndexRepository) IndexUrlsByHash ¶
func (ir *IndexRepository) IndexUrlsByHash(hash [32]byte, urlsStruct []byte) error
func (*IndexRepository) LoadVisitedUrls ¶
func (ir *IndexRepository) LoadVisitedUrls(visitedURLs *sync.Map) error
func (*IndexRepository) SaveDocument ¶
func (ir *IndexRepository) SaveDocument(doc *model.Document) error
func (*IndexRepository) SaveSaltArrays ¶
func (ir *IndexRepository) SaveSaltArrays(a, b [128]uint64) error
func (*IndexRepository) SaveVisitedUrls ¶
func (ir *IndexRepository) SaveVisitedUrls(visitedURLs *sync.Map) error
func (*IndexRepository) UpdateBiFreq ¶
func (ir *IndexRepository) UpdateBiFreq(biS map[[2]uint64]int) error
func (*IndexRepository) UpdateChunkingCounts ¶
func (ir *IndexRepository) UpdateChunkingCounts() error
func (*IndexRepository) UploadSaltArrays ¶
func (ir *IndexRepository) UploadSaltArrays() ([128]uint64, [128]uint64, error)
Click to show internal directories.
Click to hide internal directories.