Documentation ¶
Index ¶
- type InMemoryBleveIndexer
- func (i *InMemoryBleveIndexer) Close() error
- func (i *InMemoryBleveIndexer) FindByID(linkID uuid.UUID) (*index.Document, error)
- func (i *InMemoryBleveIndexer) Index(doc *index.Document) error
- func (i *InMemoryBleveIndexer) Search(q index.Query) (index.Iterator, error)
- func (i *InMemoryBleveIndexer) UpdateScore(linkID uuid.UUID, score float64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryBleveIndexer ¶
type InMemoryBleveIndexer struct {
// contains filtered or unexported fields
}
InMemoryBleveIndexer is an Indexer implementation that uses an in-memory bleve instance to catalogue and search documents.
func NewInMemoryBleveIndexer ¶
func NewInMemoryBleveIndexer() (*InMemoryBleveIndexer, error)
NewInMemoryBleveIndexer creates a text indexer that uses an in-memory bleve instance for indexing documents.
func (*InMemoryBleveIndexer) Close ¶
func (i *InMemoryBleveIndexer) Close() error
Close the indexer and release any allocated resources.
func (*InMemoryBleveIndexer) Index ¶
func (i *InMemoryBleveIndexer) Index(doc *index.Document) error
Index inserts a new document to the index or updates the index entry for and existing document.
func (*InMemoryBleveIndexer) Search ¶
Search the index for a particular query and return back a result iterator.
func (*InMemoryBleveIndexer) UpdateScore ¶
func (i *InMemoryBleveIndexer) UpdateScore(linkID uuid.UUID, score float64) error
UpdateScore updates the PageRank score for a document with the specified link ID. If no such document exists, a placeholder document with the provided score will be created.