Documentation
¶
Index ¶
- Constants
- func Clear(index string) error
- func Count(index, keyword string, args ...Any) (int64, error)
- func Delete(index string, ids []string) error
- func FilterMatch(filter Filter, payload Map) bool
- func ListCapabilities() map[string]Capabilities
- func QuerySignature(index string, q Query) string
- func Signature(index, keyword string, args ...Any) string
- func Upsert(index string, rows ...Map) error
- type Capabilities
- type Config
- type Configs
- type Connection
- type Driver
- type Facet
- type Filter
- type Hit
- type Index
- type Indexes
- type Instance
- type Module
- func (m *Module) Capabilities(index string) Capabilities
- func (m *Module) Clear(index string) error
- func (m *Module) Close()
- func (m *Module) Config(global Map)
- func (m *Module) Count(index, keyword string, args ...Any) (int64, error)
- func (m *Module) Delete(index string, ids []string) error
- func (m *Module) ListCapabilities() map[string]Capabilities
- func (m *Module) Open()
- func (m *Module) Register(name string, value Any)
- func (m *Module) RegisterConfig(name string, cfg Config)
- func (m *Module) RegisterConfigs(configs Configs)
- func (m *Module) RegisterDriver(name string, driver Driver)
- func (m *Module) RegisterIndex(name string, index Index)
- func (m *Module) RegisterIndexes(indexes Indexes)
- func (m *Module) Search(index, keyword string, args ...Any) (Result, error)
- func (m *Module) Setup()
- func (m *Module) Start()
- func (m *Module) Stop()
- func (m *Module) Upsert(index string, rows ...Map) error
- type Query
- type Result
- type Sort
Constants ¶
View Source
const ( FilterEq = "eq" FilterNe = "ne" FilterGt = "gt" FilterGte = "gte" FilterLt = "lt" FilterLte = "lte" FilterIn = "in" FilterNin = "nin" FilterRange = "range" )
Variables ¶
This section is empty.
Functions ¶
func FilterMatch ¶
func ListCapabilities ¶
func ListCapabilities() map[string]Capabilities
func QuerySignature ¶
Types ¶
type Capabilities ¶
type Capabilities struct {
SyncIndex bool
Clear bool
Upsert bool
Delete bool
Search bool
Count bool
Suggest bool
Sort bool
Facets bool
Highlight bool
FilterOps []string
}
func GetCapabilities ¶
func GetCapabilities(index string) Capabilities
type Connection ¶
type Connection interface {
Open() error
Close() error
Capabilities() Capabilities
SyncIndex(name string, index Index) error
Clear(index string) error
Upsert(index string, rows []Map) error
Delete(index string, ids []string) error
Search(index string, query Query) (Result, error)
Count(index string, query Query) (int64, error)
}
type Driver ¶
type Driver interface {
Connect(*Instance) (Connection, error)
}
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) Capabilities ¶
func (m *Module) Capabilities(index string) Capabilities
func (*Module) ListCapabilities ¶
func (m *Module) ListCapabilities() map[string]Capabilities
func (*Module) RegisterConfig ¶
func (*Module) RegisterConfigs ¶
func (*Module) RegisterDriver ¶
func (*Module) RegisterIndex ¶
func (*Module) RegisterIndexes ¶
type Query ¶
type Query struct {
Keyword string
Prefix bool
Filters []Filter
Sorts []Sort
Offset int
Limit int
Fields []string
Facets []string
Highlight []string
Raw Map
Setting Map
}
func BuildQuery ¶
Click to show internal directories.
Click to hide internal directories.