I have the following query:
{"filtered":{"query":{"query_string":{"query":"*"}},"filter":{"and":[{"term":{"active":true}},{"term":{"tenant":"4e669ec4139ad42bb8428031"}}]}}}
Which accurately returns the following result:
{ id: '4e7d7847a3e2486722000003',
firstName: 'Tets',
lastName: 'Test2',
email: '',
username: 'vailripper',
userType: 'member',
birthdate: '',
homePhone: '',
gender: 'Female',
active: true,
tags: [ 'sport-light', 'a test tag' ],
tenant: '4e669ec4139ad42bb8428031' }
However, when I add a a terms filter to filter on the 'a test tag' tag, it
doesn't return anything:
{"filtered":{"query":{"query_string":{"query":"*"}},"filter":{"and":[{"term":{"active":true}},{"term":{"tenant":"4e669ec4139ad42bb8428031"}},{"terms":{"tags":["a
test tag"]}}]}}}
In addition, if I add just a 'test' tag filter, it returns any tag with
'test' in its name, I was under the impression that it should only match on
the entire fields value?
{"filtered":{"query":{"query_string":{"query":"*"}},"filter":{"and":[{"term":{"active":true}},{"term":{"tenant":"4e669ec4139ad42bb8428031"}},{"terms":{"tags":["test"]}}]}}}
I Appreciate the Help,
Tyler