Skip to content

Commit

Permalink
Merge pull request mattbaird#182 from splicers/bool-filter
Browse files Browse the repository at this point in the history
Add setter method for boolean filter in dsl
  • Loading branch information
mattbaird committed Apr 7, 2015
2 parents 796dd81 + 5040728 commit 0e8e430
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/searchfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ func (f *FilterWrap) String() string {
return fmt.Sprintf(`fopv: %d:%v`, len(f.filters), f.filters)
}

// Bool sets the type of boolean filter to use.
// Accepted values are "and" and "or".
func (f *FilterWrap) Bool(s string) {
f.boolClause = s
}

// Custom marshalling to support the query dsl
func (f *FilterWrap) addFilters(fl []interface{}) {
if len(fl) > 1 {
Expand Down

0 comments on commit 0e8e430

Please sign in to comment.