Documentation ¶
Overview ¶
Explore graph analytics. Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. An initial request to the `_explore` API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. Subsequent requests enable you to spider out from one more vertices of interest. You can exclude vertices that have already been returned.
Index ¶
- Variables
- type Explore
- func (r *Explore) Connections(connections *types.Hop) *Explore
- func (r *Explore) Controls(controls *types.ExploreControls) *Explore
- func (r Explore) Do(providedCtx context.Context) (*Response, error)
- func (r *Explore) ErrorTrace(errortrace bool) *Explore
- func (r *Explore) FilterPath(filterpaths ...string) *Explore
- func (r *Explore) Header(key, value string) *Explore
- func (r *Explore) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *Explore) Human(human bool) *Explore
- func (r Explore) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *Explore) Pretty(pretty bool) *Explore
- func (r *Explore) Query(query *types.Query) *Explore
- func (r *Explore) Raw(raw io.Reader) *Explore
- func (r *Explore) Request(req *Request) *Explore
- func (r *Explore) Routing(routing string) *Explore
- func (r *Explore) Timeout(duration string) *Explore
- func (r *Explore) Vertices(vertices ...types.VertexDefinition) *Explore
- type NewExplore
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type Explore ¶
type Explore struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Explore
Explore graph analytics. Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. An initial request to the `_explore` API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. Subsequent requests enable you to spider out from one more vertices of interest. You can exclude vertices that have already been returned.
https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html
func (*Explore) Connections ¶ added in v8.9.0
Connections Specifies or more fields from which you want to extract terms that are associated with the specified vertices. API name: connections
func (*Explore) Controls ¶ added in v8.9.0
func (r *Explore) Controls(controls *types.ExploreControls) *Explore
Controls Direct the Graph API how to build the graph. API name: controls
func (Explore) Do ¶
Do runs the request through the transport, handle the response and returns a explore.Response
func (*Explore) ErrorTrace ¶ added in v8.14.0
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*Explore) FilterPath ¶ added in v8.14.0
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*Explore) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*Explore) Human ¶ added in v8.14.0
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (Explore) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*Explore) Pretty ¶ added in v8.14.0
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*Explore) Query ¶ added in v8.9.0
Query A seed query that identifies the documents of interest. Can be any valid Elasticsearch query. API name: query
func (*Explore) Raw ¶
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*Explore) Routing ¶
Routing Custom value used to route operations to a specific shard. API name: routing
type NewExplore ¶
NewExplore type alias for index.
func NewExploreFunc ¶
func NewExploreFunc(tp elastictransport.Interface) NewExplore
NewExploreFunc returns a new instance of Explore with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Request ¶
type Request struct { // Connections Specifies or more fields from which you want to extract terms that are // associated with the specified vertices. Connections *types.Hop `json:"connections,omitempty"` // Controls Direct the Graph API how to build the graph. Controls *types.ExploreControls `json:"controls,omitempty"` // Query A seed query that identifies the documents of interest. Can be any valid // Elasticsearch query. Query *types.Query `json:"query,omitempty"` // Vertices Specifies one or more fields that contain the terms you want to include in // the graph as vertices. Vertices []types.VertexDefinition `json:"vertices,omitempty"` }
Request holds the request body struct for the package explore
type Response ¶ added in v8.7.0
type Response struct { Connections []types.Connection `json:"connections"` Failures []types.ShardFailure `json:"failures"` TimedOut bool `json:"timed_out"` Took int64 `json:"took"` Vertices []types.Vertex `json:"vertices"` }
Response holds the response body struct for the package explore