Skip to content

Commit

Permalink
add test for nested boolean DSL query #10272
Browse files Browse the repository at this point in the history
  • Loading branch information
vbradnitski committed Sep 19, 2023
1 parent 7bed4fe commit fb4a0ca
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ public void mustNot()
test( "mustNot" );
}

@Test
public void mustNotArray()
throws Exception
{
test( "mustNot_array" );
}

@Test
public void should()
throws Exception
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"boolean" : {
"mustNot" : [
{
"boolean" : {
"should" : {
"fulltext" : {
"fields" : [
"displayName"
],
"query" : "fisk"
},
"term" : {
"field" : "custom_number",
"value" : 2.4
}
}
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"bool" : {
"must_not" : {
"bool" : {
"should" : [
{
"simple_query_string" : {
"query" : "fisk",
"fields" : [
"displayname._analyzed"
],
"analyzer" : "fulltext_search_default",
"analyze_wildcard" : true
}
},
{
"term" : {
"custom_number._number" : {
"value" : 2.4,
"_name" : "custom_number._number"
}
}
}
]
}
}
}
}

0 comments on commit fb4a0ca

Please sign in to comment.