search

package
v0.0.0-...-5284134 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElasticSearch

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

func (*ElasticSearch) Delete

func (e *ElasticSearch) Delete(index string, id string) error

func (*ElasticSearch) Index

func (e *ElasticSearch) Index(index string, doc map[string]any) (string, error)

func (*ElasticSearch) Search

func (e *ElasticSearch) Search(index string, query any) (any, error)

func (*ElasticSearch) Update

func (e *ElasticSearch) Update(index string, id string, doc map[string]any) error

type ISearch

type ISearch interface {
	Search(index string, query any) (any, error)
	Index(index string, doc map[string]any) (string, error)
	Update(index, id string, doc map[string]any) error
	Delete(index string, id string) error
}

func NewElasticSearch

func NewElasticSearch() ISearch

func NewZincSearch

func NewZincSearch() ISearch

type NullSearch

type NullSearch struct {
}

func (*NullSearch) Delete

func (n *NullSearch) Delete(index string, id string) error

func (*NullSearch) Index

func (n *NullSearch) Index(index string, doc map[string]any) (string, error)

func (*NullSearch) Search

func (n *NullSearch) Search(index string, query any) (any, error)

func (*NullSearch) Update

func (n *NullSearch) Update(index string, id string, doc map[string]any) error

type PineZincSearch

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

func (*PineZincSearch) Delete

func (p *PineZincSearch) Delete(index, id string) error

func (*PineZincSearch) Index

func (p *PineZincSearch) Index(index string, doc map[string]any) (string, error)

func (*PineZincSearch) Search

func (p *PineZincSearch) Search(index string, _query any) (any, error)

func (*PineZincSearch) Update

func (p *PineZincSearch) Update(index, id string, doc map[string]any) error

type SearchParams

type SearchParams struct {
	Index string
	Query map[string]any
	From  int
	Size  int
	Sort  []string
	Aggs  map[string]any
}

type SearchResult

type SearchResult struct {
	Total int64
	Hits  []map[string]any
	Aggs  map[string]any
}

Jump to

Keyboard shortcuts

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