Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions search_queries_range.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,17 @@ func (q *RangeQuery) Source() (interface{}, error) {
params := make(map[string]interface{})
rangeQ[q.name] = params

params["from"] = q.from
params["to"] = q.to
if q.includeLower {
params["gte"] = q.from
} else {
params["gt"] = q.from
}

if q.includeUpper {
params["lte"] = q.to
} else {
params["lt"] = q.to
}
if q.timeZone != "" {
params["time_zone"] = q.timeZone
}
Expand All @@ -144,8 +153,6 @@ func (q *RangeQuery) Source() (interface{}, error) {
if q.boost != nil {
params["boost"] = *q.boost
}
params["include_lower"] = q.includeLower
params["include_upper"] = q.includeUpper

if q.queryName != "" {
rangeQ["_name"] = q.queryName
Expand Down
2 changes: 1 addition & 1 deletion search_queries_script_score.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type ScriptScoreQuery struct {
// NewScriptScoreQuery creates and initializes a new script_score query.
func NewScriptScoreQuery(query Query, script *Script) *ScriptScoreQuery {
return &ScriptScoreQuery{
query: query,
query: query,
script: script,
}
}
Expand Down
2 changes: 1 addition & 1 deletion xpack_security_get_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ type XPackSecurityRole struct {
type XPackSecurityApplicationPrivileges struct {
Application string `json:"application"`
Privileges []string `json:"privileges"`
Resources []string `json:"resources"`
Resources []string `json:"resources"`
}

// XPackSecurityIndicesPermissions is the indices permission object
Expand Down