Documentation ¶
Overview ¶
Explore extracted and summarized information about the documents and terms in an index.
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) Header(key, value string) *Explore
- func (r *Explore) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r Explore) Perform(providedCtx context.Context) (*http.Response, error)
- 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 extracted and summarized information about the documents and terms in an index.
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) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (Explore) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
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