Open austince opened 5 years ago
@austince Thanks for reporting this. I have verified that this is an issue which only affects the REPL. The module works correctly when you require it inside node REPL:
elastic-builder on master [!] is 📦 v0.0.0-development
➜ node
> const esb = require('.')
undefined
> esb.termsQuery('user', ['kimchy', 'elasticsearch'])
TermsQuery {
queryType: 'terms',
_body: { terms: {} },
_queryOpts: {},
_isTermsLookup: false,
_termsLookupOpts: {},
_values: [ 'kimchy', 'elasticsearch' ],
_field: 'user' }
>
I will check and correct this soon.
Thanks @sudo-suhas! Yes, just using the node REPL is not a huge problem.
node version: v8.11.3 esb version: 2.2.2
When using the
termsQuery
it incorrectly checks the terms type.In the REPL: