Skip to content

Commit 4e09691

Browse files
committed
Merge branch 'master' of github.com:nyaruka/rp-indexer
2 parents 2ea612d + b04368a commit 4e09691

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: indexer_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ func TestIndexing(t *testing.T) {
130130
elastic.NewMatchQuery("fields.text", "the rock")))
131131
assertQuery(t, client, physicalName, query, []int64{1})
132132

133+
// people with no nickname
134+
notQuery := elastic.NewBoolQuery().MustNot(
135+
elastic.NewNestedQuery("fields", elastic.NewBoolQuery().Must(
136+
elastic.NewMatchQuery("fields.field", "17103bb1-1b48-4b70-92f7-1f6b73bd3488"),
137+
elastic.NewExistsQuery("fields.text"))))
138+
assertQuery(t, client, physicalName, notQuery, []int64{3, 4, 5, 6, 7, 8, 9, 10})
139+
133140
// no tokenizing of field text
134141
query = elastic.NewNestedQuery("fields", elastic.NewBoolQuery().Must(
135142
elastic.NewMatchQuery("fields.field", "17103bb1-1b48-4b70-92f7-1f6b73bd3488"),

0 commit comments

Comments
 (0)