Skip to content

Commit

Permalink
#82 Updated boolean query to support options on the outer block
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed Feb 1, 2014
1 parent c8f3b2b commit d7f7e0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/com/sksamuel/elastic4s/queries.scala
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ trait QueryDsl {
def ids(ids: String*): IdQueryDefinition = new IdQueryDefinition(ids: _*)
def all: MatchAllQueryDefinition = new MatchAllQueryDefinition

def bool(block: => BoolQueryDefinition): QueryDefinition = block
def bool(block: => BoolQueryDefinition): BoolQueryDefinition = block
def must(queries: QueryDefinition*): BoolQueryDefinition = new BoolQueryDefinition().must(queries: _*)
def should(queries: QueryDefinition*): BoolQueryDefinition = new BoolQueryDefinition().should(queries: _*)
def not(queries: QueryDefinition*): BoolQueryDefinition = new BoolQueryDefinition().not(queries: _*)
Expand Down
4 changes: 2 additions & 2 deletions src/test/scala/com/sksamuel/elastic4s/SearchDslTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ class SearchDslTest extends FlatSpec with MockitoSugar with OneInstancePerTest {
term("bassist" -> "berryman")
} not {
term("singer" -> "anderson")
} boost 2.4 minimumShouldMatch 2 adjustPureNegative false disableCoord true queryName "booly"
}
}
} boost 2.4 minimumShouldMatch 2 adjustPureNegative false disableCoord true queryName "booly"
} preference Preference.Local
assert(json === mapper.readTree(req._builder.toString))
}
Expand Down

0 comments on commit d7f7e0e

Please sign in to comment.