Documentation
¶
Index ¶
- type ES5
- func (e *ES5) ClearScroll(ctx context.Context, scrollID string)
- func (e *ES5) GetIndices(ctx context.Context) ([]string, error)
- func (e *ES5) GetIndicesAliases(ctx context.Context, indices string) (map[string][]string, error)
- func (e *ES5) GetIndicesSetting(ctx context.Context, indices string) ([]byte, error)
- func (e *ES5) GetTemplates(ctx context.Context) (map[string]any, error)
- func (e *ES5) ProcessIndicesData(ctx context.Context, options ...Option) error
- type FsInput
- func (f *FsInput) GetIndices(ctx context.Context) ([]string, error)
- func (f *FsInput) GetIndicesAliases(ctx context.Context, indices string) (map[string][]string, error)
- func (f *FsInput) GetIndicesSetting(ctx context.Context, indices string) ([]byte, error)
- func (f *FsInput) GetTemplates(ctx context.Context) (map[string]any, error)
- func (f *FsInput) ProcessIndicesData(ctx context.Context, options ...Option) error
- type IInput
- type Option
- func WithBuildBulkBodyProcess(fn func(bulkBody bytes.Buffer, scrollID string, docCount int) error) Option
- func WithDocsProcess(fn func(docs []map[string]interface{}, scrollID string, docCount int)) Option
- func WithOption(indices string, size int) Option
- func WithQuery(query string) Option
- func WithScrollID(scrollID string) Option
- type Options
- type ScrollConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ES5 ¶
type ES5 struct {
// contains filtered or unexported fields
}
func (*ES5) GetIndicesAliases ¶
GetIndicesAliases 获取所有索引别名
func (*ES5) GetIndicesSetting ¶
type FsInput ¶
type FsInput struct {
// contains filtered or unexported fields
}
func (*FsInput) GetIndicesAliases ¶
func (*FsInput) GetIndicesSetting ¶
func (*FsInput) GetTemplates ¶
type IInput ¶
type IInput interface {
GetTemplates(ctx context.Context) (map[string]any, error)
GetIndices(ctx context.Context) ([]string, error)
GetIndicesSetting(ctx context.Context, indices string) ([]byte, error)
GetIndicesAliases(ctx context.Context, indices string) (map[string][]string, error)
ProcessIndicesData(ctx context.Context, options ...Option) error
}
type Option ¶
type Option func(*Options)
func WithBuildBulkBodyProcess ¶
func WithBuildBulkBodyProcess(fn func(bulkBody bytes.Buffer, scrollID string, docCount int) error) Option
WithBuildBulkBodyProcess 设置批量构建处理函数
func WithDocsProcess ¶
WithDocsProcess 设置文档处理函数
type Options ¶
type Options struct {
Indices string // 必填:索引名称,多个用逗号分隔
Size int // 必填:每批次查询的数量,必须>0
ScrollID string // 可选:滚动ID,首次查询可为空
Query string // 可选:DSL查询语句,默认查询所有
DocsProcess func(docs []map[string]interface{}, scrollID string, docCount int) // 文档处理函数
BuildBulkBodyProcess func(bulkBody bytes.Buffer, scrollID string, docCount int) error // 批量构建处理函数
}
Options 用于配置索引数据滚动查询的所有参数
Source Files
¶
- es5.go
- fs.go
- input.go
- option.go
Click to show internal directories.
Click to hide internal directories.