I am getting an invalid query when using the .filter with "match"
this.builder.filter('match', 'message', 'this is a test')
results in this output from returnBody(). see the empty {} where "this is a test" should be.
{"query":{"filtered":{"filter":{"bool":{"must":[{"match":{"message":{} }}],"should":[],"must_not":[]}}}}}
Using query instead of filter results in a desired output:
this.builder.query('match', 'message', 'this is a test')
{"query":{"match":{"message":{"query":"this is a test"}}}}
I need to use .filter for some more advanced queries to include range with the match. Is there something I am missing?
I am getting an invalid query when using the .filter with "match"
this.builder.filter('match', 'message', 'this is a test')results in this output from returnBody(). see the empty {} where "this is a test" should be.
Using query instead of filter results in a desired output:
this.builder.query('match', 'message', 'this is a test')I need to use .filter for some more advanced queries to include range with the match. Is there something I am missing?