Skip to content

Commit

Permalink
POC: ElasticSearch support
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-r-west committed Feb 16, 2024
1 parent ecd3d05 commit ad58315
Showing 1 changed file with 34 additions and 24 deletions.
58 changes: 34 additions & 24 deletions external/epsearchast/v3/els/els_query_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import (
func TestSimpleBinaryOperatorGeneratesCorrectQueryWithFieldOveride(t *testing.T) {
//Fixture Setup
//language=JSON
jsonTxt := `
{
"type": "GT",
"args": [ "updated_at", "2020-12-25" ]
}
jsonTxt := `{
"type": "GT",
"args": [
"updated_at",
"2020-12-25"
]
}
`

//language=JSON
Expand Down Expand Up @@ -52,11 +54,13 @@ func TestSimpleBinaryOperatorGeneratesCorrectQueryWithFieldOveride(t *testing.T)
func TestSimpleBinaryOperatorGeneratesCorrectQuery(t *testing.T) {
//Fixture Setup
//language=JSON
jsonTxt := `
{
"type": "EQ",
"args": [ "email", "[email protected]" ]
}
jsonTxt := `{
"type": "EQ",
"args": [
"email",
"[email protected]"
]
}
`

//language=JSON
Expand Down Expand Up @@ -86,20 +90,26 @@ func TestSimpleRecursiveStructure(t *testing.T) {
//Fixture Setup
//language=JSON
jsonTxt := `
{
"type": "AND",
"children": [
{
"type": "IN",
"args": ["status", "new", "paid"]
},
{
"type": "GE",
"args": [ "amount", "5"]
}
]
}
`
{
"type": "AND",
"children": [
{
"type": "IN",
"args": [
"status",
"new",
"paid"
]
},
{
"type": "GE",
"args": [
"amount",
"5"
]
}
]
}`

//language=JSON
expectedJson := `{
Expand Down

0 comments on commit ad58315

Please sign in to comment.