es

package
v0.0.0-...-8b501b0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElasticSearchIndexer

type ElasticSearchIndexer struct {
	// contains filtered or unexported fields
}

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

func NewElasticSearchIndexer

func NewElasticSearchIndexer(esNodes []string, syncUpdates bool) (*ElasticSearchIndexer, error)

NewElasticSearchIndexer creates a text indexer that uses an in-memory bleve instance for indexing documents.

func (*ElasticSearchIndexer) FindByID

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

FindByID looks up a document by its link ID.

func (*ElasticSearchIndexer) Index

func (i *ElasticSearchIndexer) Index(doc *index.Document) error

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

func (*ElasticSearchIndexer) Search

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

func (*ElasticSearchIndexer) UpdateScore

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