Documentation ¶
Index ¶
- type Client
- func (ec *Client) CloseIndex(ctx context.Context, index string) error
- func (ec *Client) Count(ctx context.Context, index string) (int, error)
- func (ec *Client) CreateIndex(ctx context.Context, index string, body map[string]any) error
- func (ec *Client) DeleteByQuery(ctx context.Context, req *searchstore.DeleteByQueryRequest) error
- func (ec *Client) DeleteIndex(ctx context.Context, index []string) error
- func (ec *Client) GetIndexAlias(ctx context.Context, name string) (map[string]any, error)
- func (ec *Client) GetIndexMappings(ctx context.Context, index string) (*searchstore.Mappings, error)
- func (ec *Client) GetIndicesStats(ctx context.Context, indexPattern string) ([]searchstore.IndexStats, error)
- func (ec *Client) GetMapper() searchstore.Mapper
- func (ec *Client) Index(ctx context.Context, req *searchstore.IndexRequest) error
- func (ec *Client) IndexExists(ctx context.Context, index string) (bool, error)
- func (ec *Client) IndexWithID(ctx context.Context, req *searchstore.IndexWithIDRequest) error
- func (ec *Client) ListIndices(ctx context.Context, indices []string) ([]string, error)
- func (ec *Client) Perform(req *http.Request) (*http.Response, error)
- func (ec *Client) PutIndexAlias(ctx context.Context, index []string, name string) error
- func (ec *Client) PutIndexMappings(ctx context.Context, index string, mapping map[string]any) error
- func (ec *Client) PutIndexSettings(ctx context.Context, index string, settings map[string]any) error
- func (ec *Client) RefreshIndex(ctx context.Context, index string) error
- func (ec *Client) Search(ctx context.Context, req *searchstore.SearchRequest) (*searchstore.SearchResponse, error)
- func (ec *Client) SendBulkRequest(ctx context.Context, items []searchstore.BulkItem) ([]searchstore.BulkItem, error)
- type Mapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateIndex ¶
func (*Client) DeleteByQuery ¶
func (ec *Client) DeleteByQuery(ctx context.Context, req *searchstore.DeleteByQueryRequest) error
func (*Client) DeleteIndex ¶
func (*Client) GetIndexAlias ¶
func (*Client) GetIndexMappings ¶
func (*Client) GetIndicesStats ¶
func (ec *Client) GetIndicesStats(ctx context.Context, indexPattern string) ([]searchstore.IndexStats, error)
GetIndicesStats uses the index stats API to fetch statistics about indices. indexPattern is a wildcard pattern used to select the indices we care about.
func (*Client) GetMapper ¶
func (ec *Client) GetMapper() searchstore.Mapper
func (*Client) Index ¶
func (ec *Client) Index(ctx context.Context, req *searchstore.IndexRequest) error
func (*Client) IndexExists ¶
func (*Client) IndexWithID ¶
func (ec *Client) IndexWithID(ctx context.Context, req *searchstore.IndexWithIDRequest) error
func (*Client) ListIndices ¶
ListIndices returns the list of indices that match the index name pattern on input from the OS cluster
func (*Client) PutIndexAlias ¶
func (*Client) PutIndexMappings ¶
PutIndexMappings add field type mapping data to a previously created ES index Dynamic mapping is disabled upon index creation, so it is a requirement to explicitly define mappings for each column
func (*Client) PutIndexSettings ¶
func (*Client) RefreshIndex ¶
func (*Client) Search ¶
func (ec *Client) Search(ctx context.Context, req *searchstore.SearchRequest) (*searchstore.SearchResponse, error)
func (*Client) SendBulkRequest ¶
func (ec *Client) SendBulkRequest(ctx context.Context, items []searchstore.BulkItem) ([]searchstore.BulkItem, error)
SendBulkRequest can perform multiple indexing or delete operations in a single call
Click to show internal directories.
Click to hide internal directories.