Closed
Description
Following up on #1872.
IsVerbatim works fine on a single TermQuery but i can't seem to get it to work when combining mutiple queries.
var container = new QueryContainer(new TermQuery
{
Field = "surname",
Value = ""
});
container &= new TermQuery
{
Field = "age",
Value = "10"
}
((IQueryContainer)container).IsVerbatim = true;
ElasticClient.Search<MyType>(new SearchRequest { Query = container });
This results in
POST /<index>/<type>/_search
{
"query": {
"term": {
"age": {
"value": "10"
}
}
}
}
While I expect
POST /<index>/<type>/_search
{
"query": {
"bool": {
"must": [
{
"term": {
"surname": {
"value": ""
}
}
},
{
"term": {
"age": {
"value": "10"
}
}
}
]
}
}
}
Metadata
Metadata
Assignees
Labels
No labels