pragosearch

package
v0.0.0-...-a0ff063 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore

type Datastore interface {
	// contains filtered or unexported methods
}

type Indexer

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

func (*Indexer) Do

func (i *Indexer) Do() error

func (*Indexer) Priority

func (i *Indexer) Priority(priority float64) *Indexer

func (*Indexer) Set

func (i *Indexer) Set(field, value string) *Indexer

type MemoryIndex

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

func NewMemoryIndex

func NewMemoryIndex() *MemoryIndex

func (*MemoryIndex) DeleteAll

func (mi *MemoryIndex) DeleteAll() error

func (*MemoryIndex) Index

func (mi *MemoryIndex) Index(id string) *Indexer

func (*MemoryIndex) Query

func (mi *MemoryIndex) Query(q string) *SearchRequest

func (*MemoryIndex) SetAnalyzer

func (mi *MemoryIndex) SetAnalyzer(field, analyzerID string) error

type SearchRequest

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

func (*SearchRequest) Do

func (sr *SearchRequest) Do() *SearchResult

func (*SearchRequest) Offset

func (sr *SearchRequest) Offset(offset int64) *SearchRequest

func (*SearchRequest) Size

func (sr *SearchRequest) Size(size int64) *SearchRequest

type SearchResult

type SearchResult struct {
	Error   error
	Total   int64
	Results []*SearchResultItem
}

func (*SearchResult) GetIDs

func (sr *SearchResult) GetIDs() (ret []string)

type SearchResultItem

type SearchResultItem struct {
	ItemID string
	Score  float64
}

Jump to

Keyboard shortcuts

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