Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nyaruka/rp-indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
nicpottier committed Apr 18, 2018
2 parents 2ea612d + b04368a commit 4e09691
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions indexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ func TestIndexing(t *testing.T) {
elastic.NewMatchQuery("fields.text", "the rock")))
assertQuery(t, client, physicalName, query, []int64{1})

// people with no nickname
notQuery := elastic.NewBoolQuery().MustNot(
elastic.NewNestedQuery("fields", elastic.NewBoolQuery().Must(
elastic.NewMatchQuery("fields.field", "17103bb1-1b48-4b70-92f7-1f6b73bd3488"),
elastic.NewExistsQuery("fields.text"))))
assertQuery(t, client, physicalName, notQuery, []int64{3, 4, 5, 6, 7, 8, 9, 10})

// no tokenizing of field text
query = elastic.NewNestedQuery("fields", elastic.NewBoolQuery().Must(
elastic.NewMatchQuery("fields.field", "17103bb1-1b48-4b70-92f7-1f6b73bd3488"),
Expand Down

0 comments on commit 4e09691

Please sign in to comment.