Documentation
¶
Index ¶
- Constants
- Variables
- func DoCommand(method string, url string, data interface{}) ([]byte, error)
- func Pretty(pretty bool) string
- func Scan(scan int) string
- func Scroll(duration string) string
- type BaseResponse
- type ESError
- type Explaination
- 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 HttpClient = &http.Client{} )
Functions ¶
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 Explaination ¶
type Explaination struct { Value float32 `json:"value"` Description string `json:"description"` Details []Explaination `json:"details,omitempty"` }
type ExtendedStatus ¶
type Match ¶
type Match struct { OK bool `json:"ok"` Matches []string `json:"matches"` Explaination Explaination `json:"explaination,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.