asyncsearcher

package
v0.63.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncSearchRequest

type AsyncSearchRequest struct {
	ID        string `json:"-"`
	Params    processor.SearchParams
	Query     string
	Retention time.Duration
	WithDocs  bool
}

type AsyncSearchStatus

type AsyncSearchStatus byte
const (
	AsyncSearchStatusDone AsyncSearchStatus = iota
	AsyncSearchStatusInProgress
	AsyncSearchStatusError
	AsyncSearchStatusCanceled
)

type AsyncSearcher

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

func MustStartAsync

func MustStartAsync(config AsyncSearcherConfig, mp MappingProvider, fracs fracmanager.List) *AsyncSearcher

func (*AsyncSearcher) CancelSearch

func (as *AsyncSearcher) CancelSearch(id string)

func (*AsyncSearcher) DeleteSearch

func (as *AsyncSearcher) DeleteSearch(id string)

func (*AsyncSearcher) FetchSearchResult

func (*AsyncSearcher) GetAsyncSearchesList

func (as *AsyncSearcher) GetAsyncSearchesList(r GetAsyncSearchesListRequest) []*AsyncSearchesListItem

func (*AsyncSearcher) StartSearch

func (as *AsyncSearcher) StartSearch(r AsyncSearchRequest, fracs fracmanager.List) error

type AsyncSearcherConfig

type AsyncSearcherConfig struct {
	DataDir string
	Workers int

	MaxSize           int
	MaxSizePerRequest int
}

type AsyncSearchesListItem

type AsyncSearchesListItem struct {
	ID     string
	Status AsyncSearchStatus

	StartedAt  time.Time
	ExpiresAt  time.Time
	CanceledAt time.Time

	FracsDone    int
	FracsInQueue int
	DiskUsage    int

	// Search request info
	AggQueries   []processor.AggQuery
	HistInterval uint64
	Query        string
	From         seq.MID
	To           seq.MID
	Retention    time.Duration
	WithDocs     bool
	Size         int64
	Error        string
}

type FetchSearchResultRequest

type FetchSearchResultRequest struct {
	ID    string
	Limit int
	Order seq.DocsOrder
}

type FetchSearchResultResponse

type FetchSearchResultResponse struct {
	Status     AsyncSearchStatus
	QPR        seq.QPR
	CanceledAt time.Time
	Error      string

	StartedAt time.Time
	ExpiresAt time.Time

	FracsDone    int
	FracsInQueue int
	DiskUsage    int

	// Stuff that needed seq-db proxy to complete async search response.
	AggQueries   []processor.AggQuery
	HistInterval uint64

	Query     string
	From      seq.MID
	To        seq.MID
	Retention time.Duration
	WithDocs  bool
	Size      int64
}

type GetAsyncSearchesListRequest

type GetAsyncSearchesListRequest struct {
	Status *AsyncSearchStatus
	IDs    []string
}

type MappingProvider

type MappingProvider interface {
	GetMapping() seq.Mapping
}

Jump to

Keyboard shortcuts

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