Documentation
¶
Index ¶
- Constants
- Variables
- func DoCommand(method string, url string, args map[string]interface{}, data interface{}) ([]byte, error)
- func QueryString(args map[string]interface{}) (s string, err error)
- type BaseResponse
- type ESError
- type Explanation
- type ExtendedStatus
- type Facets
- type Filter
- type Match
- type Query
- type Request
- type SearchRequest
- type Status
- type Term
- type Terms
Constants ¶
View Source
const ( Version = "0.0.2" DefaultProtocol = "http" DefaultDomain = "localhost" DefaultPort = "9200" )
Variables ¶
View Source
var ( Protocol string = DefaultProtocol Domain string = DefaultDomain ClusterDomains [1]string = [1]string{DefaultDomain} Port string = DefaultPort Username string Password string )
Functions ¶
func QueryString ¶
Types ¶
type BaseResponse ¶
type BaseResponse struct {
Ok bool `json:"ok"`
Index string `json:"_index,omitempty"`
Type string `json:"_type,omitempty"`
Id string `json:"_id,omitempty"`
Source interface{} `json:"_source,omitempty"` // depends on the schema you've defined
Version int `json:"_version,omitempty"`
Found bool `json:"found,omitempty"`
Exists bool `json:"exists,omitempty"`
}
type Explanation ¶
type Explanation struct {
Value float32 `json:"value"`
Description string `json:"description"`
Details []Explanation `json:"details,omitempty"`
}
type ExtendedStatus ¶
type Match ¶
type Match struct {
OK bool `json:"ok"`
Matches []string `json:"matches"`
Explanation Explanation `json:"explanation,omitempty"`
}
type Request ¶
func ElasticSearchRequest ¶
func (*Request) DoResponse ¶
func (*Request) SetBodyJson ¶
func (*Request) SetBodyString ¶
type SearchRequest ¶
Click to show internal directories.
Click to hide internal directories.