actions

package
v6.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2018 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregation

type Aggregation interface {
	// Source returns a JSON-serializable aggregation that is a fragment
	// of the request sent to Elasticsearch.
	Source() (interface{}, error)
}

Aggregations can be seen as a unit-of-work that build analytic information over a set of documents. It is (in many senses) the follow-up of facets in Elasticsearch. For more details about aggregations, visit: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations.html

type AggregationBucketFilters

type AggregationBucketFilters struct {
	Aggregations

	Buckets      []*AggregationBucketKeyItem          //`json:"buckets"`
	NamedBuckets map[string]*AggregationBucketKeyItem //`json:"buckets"`
	Meta         map[string]interface{}               // `json:"meta,omitempty"`
}

AggregationBucketFilters is a multi-bucket aggregation that is returned with a filters aggregation.

func (*AggregationBucketFilters) UnmarshalJSON

func (a *AggregationBucketFilters) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationBucketFilters structure.

type AggregationBucketHistogramItem

type AggregationBucketHistogramItem struct {
	Aggregations

	Key         int64   //`json:"key"`
	KeyAsString *string //`json:"key_as_string"`
	DocCount    int64   //`json:"doc_count"`
}

AggregationBucketHistogramItem is a single bucket of an AggregationBucketHistogramItems structure.

func (*AggregationBucketHistogramItem) UnmarshalJSON

func (a *AggregationBucketHistogramItem) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationBucketHistogramItem structure.

type AggregationBucketHistogramItems

type AggregationBucketHistogramItems struct {
	Aggregations

	Buckets []*AggregationBucketHistogramItem //`json:"buckets"`
	Meta    map[string]interface{}            // `json:"meta,omitempty"`
}

AggregationBucketHistogramItems is a bucket aggregation that is returned with a date histogram aggregation.

func (*AggregationBucketHistogramItems) UnmarshalJSON

func (a *AggregationBucketHistogramItems) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationBucketHistogramItems structure.

type AggregationBucketKeyItem

type AggregationBucketKeyItem struct {
	Aggregations

	Key       interface{} //`json:"key"`
	KeyNumber json.Number
	DocCount  int64 //`json:"doc_count"`
}

AggregationBucketKeyItem is a single bucket of an AggregationBucketKeyItems structure.

func (*AggregationBucketKeyItem) UnmarshalJSON

func (a *AggregationBucketKeyItem) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationBucketKeyItem structure.

type AggregationBucketKeyItems

type AggregationBucketKeyItems struct {
	Aggregations

	DocCountErrorUpperBound int64                       //`json:"doc_count_error_upper_bound"`
	SumOfOtherDocCount      int64                       //`json:"sum_other_doc_count"`
	Buckets                 []*AggregationBucketKeyItem //`json:"buckets"`
	Meta                    map[string]interface{}      // `json:"meta,omitempty"`
}

AggregationBucketKeyItems is a bucket aggregation that is e.g. returned with a terms aggregation.

func (*AggregationBucketKeyItems) UnmarshalJSON

func (a *AggregationBucketKeyItems) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationBucketKeyItems structure.

type AggregationBucketKeyedRangeItems

type AggregationBucketKeyedRangeItems struct {
	Aggregations

	DocCountErrorUpperBound int64                                  //`json:"doc_count_error_upper_bound"`
	SumOfOtherDocCount      int64                                  //`json:"sum_other_doc_count"`
	Buckets                 map[string]*AggregationBucketRangeItem //`json:"buckets"`
	Meta                    map[string]interface{}                 // `json:"meta,omitempty"`
}

AggregationBucketKeyedRangeItems is a bucket aggregation that is e.g. returned with a keyed range aggregation.

func (*AggregationBucketKeyedRangeItems) UnmarshalJSON

func (a *AggregationBucketKeyedRangeItems) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationBucketRangeItems structure.

type AggregationBucketRangeItem

type AggregationBucketRangeItem struct {
	Aggregations

	Key          string   //`json:"key"`
	DocCount     int64    //`json:"doc_count"`
	From         *float64 //`json:"from"`
	FromAsString string   //`json:"from_as_string"`
	To           *float64 //`json:"to"`
	ToAsString   string   //`json:"to_as_string"`
}

AggregationBucketRangeItem is a single bucket of an AggregationBucketRangeItems structure.

func (*AggregationBucketRangeItem) UnmarshalJSON

func (a *AggregationBucketRangeItem) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationBucketRangeItem structure.

type AggregationBucketRangeItems

type AggregationBucketRangeItems struct {
	Aggregations

	DocCountErrorUpperBound int64                         //`json:"doc_count_error_upper_bound"`
	SumOfOtherDocCount      int64                         //`json:"sum_other_doc_count"`
	Buckets                 []*AggregationBucketRangeItem //`json:"buckets"`
	Meta                    map[string]interface{}        // `json:"meta,omitempty"`
}

AggregationBucketRangeItems is a bucket aggregation that is e.g. returned with a range aggregation.

func (*AggregationBucketRangeItems) UnmarshalJSON

func (a *AggregationBucketRangeItems) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationBucketRangeItems structure.

type AggregationBucketSignificantTerm

type AggregationBucketSignificantTerm struct {
	Aggregations

	Key      string  //`json:"key"`
	DocCount int64   //`json:"doc_count"`
	BgCount  int64   //`json:"bg_count"`
	Score    float64 //`json:"score"`
}

AggregationBucketSignificantTerm is a single bucket of an AggregationBucketSignificantTerms structure.

func (*AggregationBucketSignificantTerm) UnmarshalJSON

func (a *AggregationBucketSignificantTerm) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationBucketSignificantTerm structure.

type AggregationBucketSignificantTerms

type AggregationBucketSignificantTerms struct {
	Aggregations

	DocCount int64                               //`json:"doc_count"`
	Buckets  []*AggregationBucketSignificantTerm //`json:"buckets"`
	Meta     map[string]interface{}              // `json:"meta,omitempty"`
}

AggregationBucketSignificantTerms is a bucket aggregation returned with a significant terms aggregation.

func (*AggregationBucketSignificantTerms) UnmarshalJSON

func (a *AggregationBucketSignificantTerms) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationBucketSignificantTerms structure.

type AggregationExtendedStatsMetric

type AggregationExtendedStatsMetric struct {
	Aggregations

	Count        int64                  // `json:"count"`
	Min          *float64               //`json:"min,omitempty"`
	Max          *float64               //`json:"max,omitempty"`
	Avg          *float64               //`json:"avg,omitempty"`
	Sum          *float64               //`json:"sum,omitempty"`
	SumOfSquares *float64               //`json:"sum_of_squares,omitempty"`
	Variance     *float64               //`json:"variance,omitempty"`
	StdDeviation *float64               //`json:"std_deviation,omitempty"`
	Meta         map[string]interface{} // `json:"meta,omitempty"`
}

AggregationExtendedStatsMetric is a multi-value metric, returned by an ExtendedStats aggregation.

func (*AggregationExtendedStatsMetric) UnmarshalJSON

func (a *AggregationExtendedStatsMetric) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationExtendedStatsMetric structure.

type AggregationGeoBoundsMetric

type AggregationGeoBoundsMetric struct {
	Aggregations

	Bounds struct {
		TopLeft struct {
			Latitude  float64 `json:"lat"`
			Longitude float64 `json:"lon"`
		} `json:"top_left"`
		BottomRight struct {
			Latitude  float64 `json:"lat"`
			Longitude float64 `json:"lon"`
		} `json:"bottom_right"`
	} `json:"bounds"`

	Meta map[string]interface{} // `json:"meta,omitempty"`
}

AggregationGeoBoundsMetric is a metric as returned by a GeoBounds aggregation.

func (*AggregationGeoBoundsMetric) UnmarshalJSON

func (a *AggregationGeoBoundsMetric) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationGeoBoundsMetric structure.

type AggregationPercentilesMetric

type AggregationPercentilesMetric struct {
	Aggregations

	Values map[string]float64     // `json:"values"`
	Meta   map[string]interface{} // `json:"meta,omitempty"`
}

AggregationPercentilesMetric is a multi-value metric, returned by a Percentiles aggregation.

func (*AggregationPercentilesMetric) UnmarshalJSON

func (a *AggregationPercentilesMetric) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationPercentilesMetric structure.

type AggregationPipelineBucketMetricValue

type AggregationPipelineBucketMetricValue struct {
	Aggregations

	Keys          []interface{}          // `json:"keys"`
	Value         *float64               // `json:"value"`
	ValueAsString string                 // `json:"value_as_string"`
	Meta          map[string]interface{} // `json:"meta,omitempty"`
}

AggregationPipelineBucketMetricValue is a value returned e.g. by a MaxBucket aggregation.

func (*AggregationPipelineBucketMetricValue) UnmarshalJSON

func (a *AggregationPipelineBucketMetricValue) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationPipelineBucketMetricValue structure.

type AggregationPipelineDerivative

type AggregationPipelineDerivative struct {
	Aggregations

	Value                   *float64               // `json:"value"`
	ValueAsString           string                 // `json:"value_as_string"`
	NormalizedValue         *float64               // `json:"normalized_value"`
	NormalizedValueAsString string                 // `json:"normalized_value_as_string"`
	Meta                    map[string]interface{} // `json:"meta,omitempty"`
}

AggregationPipelineDerivative is the value returned by a Derivative aggregation.

func (*AggregationPipelineDerivative) UnmarshalJSON

func (a *AggregationPipelineDerivative) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationPipelineDerivative structure.

type AggregationPipelineSimpleValue

type AggregationPipelineSimpleValue struct {
	Aggregations

	Value         *float64               // `json:"value"`
	ValueAsString string                 // `json:"value_as_string"`
	Meta          map[string]interface{} // `json:"meta,omitempty"`
}

AggregationPipelineSimpleValue is a simple value, returned e.g. by a MovAvg aggregation.

func (*AggregationPipelineSimpleValue) UnmarshalJSON

func (a *AggregationPipelineSimpleValue) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationPipelineSimpleValue structure.

type AggregationSingleBucket

type AggregationSingleBucket struct {
	Aggregations

	DocCount int64                  // `json:"doc_count"`
	Meta     map[string]interface{} // `json:"meta,omitempty"`
}

AggregationSingleBucket is a single bucket, returned e.g. via an aggregation of type Global.

func (*AggregationSingleBucket) UnmarshalJSON

func (a *AggregationSingleBucket) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationSingleBucket structure.

type AggregationStatsMetric

type AggregationStatsMetric struct {
	Aggregations

	Count int64                  // `json:"count"`
	Min   *float64               //`json:"min,omitempty"`
	Max   *float64               //`json:"max,omitempty"`
	Avg   *float64               //`json:"avg,omitempty"`
	Sum   *float64               //`json:"sum,omitempty"`
	Meta  map[string]interface{} // `json:"meta,omitempty"`
}

AggregationStatsMetric is a multi-value metric, returned by a Stats aggregation.

func (*AggregationStatsMetric) UnmarshalJSON

func (a *AggregationStatsMetric) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationStatsMetric structure.

type AggregationTopHitsMetric

type AggregationTopHitsMetric struct {
	Aggregations

	Hits *SearchHits            //`json:"hits"`
	Meta map[string]interface{} // `json:"meta,omitempty"`
}

AggregationTopHitsMetric is a metric returned by a TopHits aggregation.

func (*AggregationTopHitsMetric) UnmarshalJSON

func (a *AggregationTopHitsMetric) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationTopHitsMetric structure.

type AggregationValueMetric

type AggregationValueMetric struct {
	Aggregations

	Value *float64               //`json:"value"`
	Meta  map[string]interface{} // `json:"meta,omitempty"`
}

AggregationValueMetric is a single-value metric, returned e.g. by a Min or Max aggregation.

func (*AggregationValueMetric) UnmarshalJSON

func (a *AggregationValueMetric) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON data and initializes an AggregationValueMetric structure.

type Aggregations

type Aggregations map[string]*json.RawMessage

Aggregations is a list of aggregations that are part of a search result.

func (Aggregations) AvgBucket

AvgBucket returns average bucket pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-avg-bucket-aggregation.html

func (Aggregations) BucketScript

func (a Aggregations) BucketScript(name string) (*AggregationPipelineSimpleValue, bool)

BucketScript returns bucket script pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-bucket-script-aggregation.html

func (Aggregations) CumulativeSum

func (a Aggregations) CumulativeSum(name string) (*AggregationPipelineSimpleValue, bool)

CumulativeSum returns a cumulative sum pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-cumulative-sum-aggregation.html

func (Aggregations) Derivative

func (a Aggregations) Derivative(name string) (*AggregationPipelineDerivative, bool)

Derivative returns derivative pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-derivative-aggregation.html

func (Aggregations) MovAvg

MovAvg returns moving average pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-movavg-aggregation.html

func (Aggregations) SerialDiff

func (a Aggregations) SerialDiff(name string) (*AggregationPipelineSimpleValue, bool)

SerialDiff returns serial differencing pipeline aggregation results. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-serialdiff-aggregation.html

type DeleteResponse

type DeleteResponse struct {
	Index   string `json:"_index"`   // index meta field
	Type    string `json:"_type"`    // type meta field
	Id      string `json:"_id"`      // id meta field
	Version int64  `json:"_version"` // version number, when Version is set to true in SearchService
	Found   bool   `json:"found,omitempty"`
}

type DeleteService

type DeleteService struct {
	// contains filtered or unexported fields
}

func NewDeleteService

func NewDeleteService(conn *connection.Connection) *DeleteService

func (*DeleteService) Do

func (d *DeleteService) Do() (*DeleteResponse, error)

func (*DeleteService) Id

func (d *DeleteService) Id(_id string) *DeleteService

func (*DeleteService) Pretty

func (d *DeleteService) Pretty() *DeleteService

func (*DeleteService) Type

func (d *DeleteService) Type(_type string) *DeleteService

func (*DeleteService) URLParams

func (d *DeleteService) URLParams(params url.Values) *DeleteService

type DeleteServiceOptions

type DeleteServiceOptions struct {
	Type   string `validate:"required"`
	Id     string `validate:"required"`
	Params url.Values
}

type GetResponse

type GetResponse struct {
	Index   string                 `json:"_index"`   // index meta field
	Type    string                 `json:"_type"`    // type meta field
	Id      string                 `json:"_id"`      // id meta field
	Parent  string                 `json:"_parent"`  // parent meta field
	Version int64                  `json:"_version"` // version number, when Version is set to true in SearchService
	Source  *json.RawMessage       `json:"_source,omitempty"`
	Found   bool                   `json:"found,omitempty"`
	Fields  map[string]interface{} `json:"fields,omitempty"`
}

type GetService

type GetService struct {
	// contains filtered or unexported fields
}

func NewGetService

func NewGetService(conn *connection.Connection) *GetService

func (*GetService) Do

func (g *GetService) Do() (*GetResponse, error)

func (*GetService) Id

func (g *GetService) Id(_id string) *GetService

func (*GetService) Pretty

func (g *GetService) Pretty() *GetService

func (*GetService) Type

func (g *GetService) Type(_type string) *GetService

func (*GetService) URLParams

func (g *GetService) URLParams(params url.Values) *GetService

type GetServiceOptions

type GetServiceOptions struct {
	Type   string `validate:"required"`
	Id     string `validate:"required"`
	Params url.Values
}

type GetStreamResponse

type GetStreamResponse struct {
	// contains filtered or unexported fields
}

func (*GetStreamResponse) Next

func (g *GetStreamResponse) Next() (getResponse *GetResponse, err error)

type GetStreamService

type GetStreamService struct {
	GetService
}

func NewGetStreamService

func NewGetStreamService(conn *connection.Connection) *GetStreamService

func (*GetStreamService) Do

func (*GetStreamService) Id

func (*GetStreamService) Pretty

func (g *GetStreamService) Pretty() *GetStreamService

func (*GetStreamService) Type

func (g *GetStreamService) Type(_type string) *GetStreamService

func (*GetStreamService) URLParams

func (g *GetStreamService) URLParams(params url.Values) *GetStreamService

type IndexResponse

type IndexResponse struct {
	Index   string `json:"_index"`
	Type    string `json:"_type"`
	Id      string `json:"_id"`
	Version int    `json:"_version"`
	Created bool   `json:"created"`
}

type IndexService

type IndexService struct {
	// contains filtered or unexported fields
}

func NewIndexService

func NewIndexService(conn *connection.Connection) *IndexService

func (*IndexService) Body

func (i *IndexService) Body(body string) *IndexService

func (*IndexService) Do

func (i *IndexService) Do() (*IndexResponse, error)

func (*IndexService) Id

func (i *IndexService) Id(_id string) *IndexService

func (*IndexService) Pretty

func (i *IndexService) Pretty() *IndexService

func (*IndexService) Type

func (i *IndexService) Type(_type string) *IndexService

func (*IndexService) URLParams

func (i *IndexService) URLParams(params url.Values) *IndexService

type IndexServiceOptions

type IndexServiceOptions struct {
	Type   string `validate:"required"`
	Id     string
	Body   string `validate:"required"`
	Params url.Values
}

type SearchExplanation

type SearchExplanation struct {
	Value       float64             `json:"value"`             // e.s. 1.0
	Description string              `json:"description"`       // e.s. "boost" or "ConstantScore(*:*), product of:"
	Details     []SearchExplanation `json:"details,omitempty"` // recursive details
}

SearchExplanation explains how the score for a hit was computed. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-explain.html.

type SearchHit

type SearchHit struct {
	Score          *float64                       `json:"_score"`          // computed score
	Index          string                         `json:"_index"`          // index name
	Type           string                         `json:"_type"`           // type meta field
	Id             string                         `json:"_id"`             // external or internal
	Uid            string                         `json:"_uid"`            // uid meta field (see MapperService.java for all meta fields)
	Timestamp      int64                          `json:"_timestamp"`      // timestamp meta field
	TTL            int64                          `json:"_ttl"`            // ttl meta field
	Routing        string                         `json:"_routing"`        // routing meta field
	Parent         string                         `json:"_parent"`         // parent meta field
	Version        *int64                         `json:"_version"`        // version number, when Version is set to true in SearchService
	Sort           []interface{}                  `json:"sort"`            // sort information
	Highlight      SearchHitHighlight             `json:"highlight"`       // highlighter information
	Source         *json.RawMessage               `json:"_source"`         // stored document source
	Fields         map[string]interface{}         `json:"fields"`          // returned fields
	Explanation    *SearchExplanation             `json:"_explanation"`    // explains how the score was computed
	MatchedQueries []string                       `json:"matched_queries"` // matched queries
	InnerHits      map[string]*SearchHitInnerHits `json:"inner_hits"`      // inner hits with ES >= 1.5.0
}

SearchHit is a single hit.

type SearchHitHighlight

type SearchHitHighlight map[string][]string

Highlighting SearchHitHighlight is the highlight information of a search hit. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlightins.html for a general discussion of highlightins.

type SearchHitInnerHits

type SearchHitInnerHits struct {
	Hits *SearchHits `json:"hits"`
}

type SearchHits

type SearchHits struct {
	TotalHits int64        `json:"total"`     // total number of hits found
	MaxScore  *float64     `json:"max_score"` // maximum score of all hits
	Hits      []*SearchHit `json:"hits"`      // the actual hits returned
}

SearchResponse specifies the list of search hits.

type SearchResponse

type SearchResponse struct {
	TookInMillis int64         `json:"took"`         // search time in milliseconds
	ScrollId     string        `json:"_scroll_id"`   // only used with Scroll and Scan operations
	Hits         *SearchHits   `json:"hits"`         // the actual search hits
	Suggest      SearchSuggest `json:"suggest"`      // results from suggesters
	Aggregations Aggregations  `json:"aggregations"` // results from aggregations
	TimedOut     bool          `json:"timed_out"`    // true if the search timed out
}

type SearchService

type SearchService struct {
	// contains filtered or unexported fields
}

func NewSearchService

func NewSearchService(conn *connection.Connection) *SearchService

func (*SearchService) Body

func (s *SearchService) Body(body string) *SearchService

func (*SearchService) Do

func (s *SearchService) Do() (*SearchResponse, error)

func (*SearchService) Pretty

func (s *SearchService) Pretty() *SearchService

func (*SearchService) Type

func (s *SearchService) Type(_type string) *SearchService

func (*SearchService) Types

func (s *SearchService) Types(_types []string) *SearchService

func (*SearchService) URLParams

func (s *SearchService) URLParams(params url.Values) *SearchService

type SearchServiceOptions

type SearchServiceOptions struct {
	Type   []string `validate:"required"`
	Body   string   `validate:"required"`
	Params url.Values
}

type SearchStreamResponse

type SearchStreamResponse struct {
	// contains filtered or unexported fields
}

func (*SearchStreamResponse) Next

func (s *SearchStreamResponse) Next() (getResponse *GetResponse, err error)

type SearchStreamService

type SearchStreamService struct {
	SearchService
}

func NewSearchStreamService

func NewSearchStreamService(conn *connection.Connection) *SearchStreamService

func (*SearchStreamService) Body

func (*SearchStreamService) Do

func (*SearchStreamService) Pretty

func (*SearchStreamService) Type

func (*SearchStreamService) Types

func (s *SearchStreamService) Types(_types []string) *SearchStreamService

func (*SearchStreamService) URLParams

func (s *SearchStreamService) URLParams(params url.Values) *SearchStreamService

type SearchStreamToURLOptions

type SearchStreamToURLOptions struct {
	Type     []string         `json:"type" validate:"required"`
	Webhooks []interface{}    `json:"webhooks" validate:"required"`
	Query    *json.RawMessage `json:"query" validate:"required"`
	// contains filtered or unexported fields
}

type SearchStreamToURLResponse

type SearchStreamToURLResponse struct {
	IndexResponse
	// contains filtered or unexported fields
}

func (*SearchStreamToURLResponse) Stop

type SearchStreamToURLService

type SearchStreamToURLService struct {
	// contains filtered or unexported fields
}

func NewSearchStreamToURLService

func NewSearchStreamToURLService(conn *connection.Connection) *SearchStreamToURLService

func (*SearchStreamToURLService) AddWebhook

func (s *SearchStreamToURLService) AddWebhook(webhook interface{}) *SearchStreamToURLService

func (*SearchStreamToURLService) Do

func (*SearchStreamToURLService) Query

func (*SearchStreamToURLService) Type

func (*SearchStreamToURLService) Types

type SearchSuggest

type SearchSuggest map[string][]SearchSuggestion

Suggest SearchSuggest is a map of suggestions. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters.html.

type SearchSuggestion

type SearchSuggestion struct {
	Text    string                   `json:"text"`
	Offset  int                      `json:"offset"`
	Length  int                      `json:"length"`
	Options []SearchSuggestionOption `json:"options"`
}

SearchSuggestion is a single search suggestion. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters.html.

type SearchSuggestionOption

type SearchSuggestionOption struct {
	Text    string      `json:"text"`
	Score   float64     `json:"score"`
	Freq    int         `json:"freq"`
	Payload interface{} `json:"payload"`
}

SearchSuggestionOption is an option of a SearchSuggestion. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters.html.

type UpdateResponse

type UpdateResponse struct {
	Update      string       `json:"_index"`
	Type        string       `json:"_type"`
	Id          string       `json:"_id"`
	Version     int          `json:"_version"`
	Created     bool         `json:"created"`
	GetResponse *GetResponse `json:"get"`
}

type UpdateService

type UpdateService struct {
	// contains filtered or unexported fields
}

func NewUpdateService

func NewUpdateService(conn *connection.Connection) *UpdateService

func (*UpdateService) Body

func (u *UpdateService) Body(body string) *UpdateService

func (*UpdateService) Do

func (u *UpdateService) Do() (*UpdateResponse, error)

func (*UpdateService) Id

func (u *UpdateService) Id(_id string) *UpdateService

func (*UpdateService) Pretty

func (u *UpdateService) Pretty() *UpdateService

func (*UpdateService) Type

func (u *UpdateService) Type(_type string) *UpdateService

func (*UpdateService) URLParams

func (u *UpdateService) URLParams(params url.Values) *UpdateService

type UpdateServiceOptions

type UpdateServiceOptions struct {
	Type   string `validate:"required"`
	Id     string `validate:"required"`
	Body   string `validate:"required"`
	Params url.Values
}

type Webhook

type Webhook struct {
	URL      string `json:"url,omitempty" validate:"required"`
	Method   string `json:"method,omitempty" validate:"required"`
	Body     string `json:"body, omitempty"`
	Interval int    `json:"body,omitempty"`
	Count    int    `json:"body,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL