Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregationBucket ¶
type AggregationBucket struct {
Key string `json:"key"`
DocCount uint64 `json:"doc_count"`
Aggregations map[string]AggregationResponse `json:"aggregations,omitempty"`
}
type AggregationDateRange ¶
type AggregationNumberRange ¶
type AggregationParams ¶
type AggregationParams struct {
AggType string `json:"agg_type"`
Field string `json:"field"`
WeightField string `json:"weight_field"` // Field name to be used for setting weight for primary field for weighted average aggregation
Size int `json:"size"`
Ranges []AggregationNumberRange `json:"ranges"`
DateRanges []AggregationDateRange `json:"date_ranges"`
Aggregations map[string]AggregationParams `json:"aggs"`
}
type AggregationResponse ¶
type AggregationResponse struct {
Value interface{} `json:"value,omitempty"`
Buckets []AggregationBucket `json:"buckets,omitempty"`
}
type QueryHighlight ¶
type QueryParams ¶
type SearchResponse ¶
type SearchResponse struct {
Took int `json:"took"` // Time it took to generate the response
TimedOut bool `json:"timed_out"`
Hits Hits `json:"hits"`
Aggregations map[string]AggregationResponse `json:"aggregations,omitempty"`
Error string `json:"error,omitempty"`
}
SearchResponse for a query
type ZincQuery ¶
type ZincQuery struct {
// SearchType is the type of search to perform. Can be match, match_phrase, query_string, etc
SearchType string `json:"search_type"`
MaxResults int `json:"max_results"`
From int `json:"from"`
Explain bool `json:"explain"`
Highlight *meta.Highlight `json:"highlight"`
Query QueryParams `json:"query"`
Aggregations map[string]AggregationParams `json:"aggs"`
SortFields []string `json:"sort_fields"`
Source interface{} `json:"_source"`
}
ZincQuery is the query object for the zinc index. All search requests should send this struct
type ZincQueryForSDK ¶
type ZincQueryForSDK struct {
// SearchType is the type of search to perform. Can be match, match_phrase, query_string, etc
SearchType string `json:"search_type"`
MaxResults int `json:"max_results"`
From int `json:"from"`
Explain bool `json:"explain"`
Highlight *meta.Highlight `json:"highlight"`
Query QueryParams `json:"query"`
Aggregations map[string]AggregationParams `json:"aggs"`
SortFields []string `json:"sort_fields"`
Source []string `json:"_source"`
}
Click to show internal directories.
Click to hide internal directories.