Closed
Description
NEST/Elasticsearch.Net version: 2.2.0
Elasticsearch version: 2.2.0
Description of the problem including expected versus actual behavior:
Using a MustNot bool query, i'm trying to filter out records where a string field (not analyzed) exists, but is empty ("").
.Bool(b => b.MustNot(mn => mn.Verbatim().Term(t => t.Field(x => x.MyField).Value(""))))
This erases the whole boolean query from the JSON sent to ElasticSearch, event though I have Verbatim specified.
When putting any value other than empty string, it shows up in the JSON
EDIT:
As a workaround, I use Raw() and it does work:
.Bool(b =>b.MustNot(mn => mn.Raw("{\"query\": {\"term\": {\"myField\": {\"value\": \"\"}}}}")))
Metadata
Metadata
Assignees
Labels
No labels