elasticsearch

package
v0.0.0-...-7b67181 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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
}

Indexer is an index.Indexer implementation that uses an elastic search instance to catalogue and search documents.

func NewIndexer

func NewIndexer(nodes []string, syncUpdates bool) (*Indexer, error)

NewIndexer creates a text indexer that uses an elastic search instance for indexing documents.

func (*Indexer) FindByID

func (i *Indexer) FindByID(linkID uuid.UUID) (*index.Document, error)

FindByID looks up a document by its link ID.

func (*Indexer) Index

func (i *Indexer) Index(d *index.Document) error

Index inserts a new document to the index or updates the index entry for and existing document.

func (*Indexer) Search

func (i *Indexer) Search(q index.Query) (index.Iterator, error)

Search the index for a particular query and return back a result iterator.

func (*Indexer) UpdateScore

func (i *Indexer) 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL