elasticsearch-net
elasticsearch-net copied to clipboard
Bool-Query with many must-Clauses needed
Is your feature request related to a problem? Please describe. I need a solution to write a nest query which should have the following result:
"bool": {
"must": [
{
"term": {
"documentTags.value": {
"value": "searchvalue1",
"case_insensitive": true
}
}
}
],
"must": [
{
"term": {
"documentTags.value": {
"value": "searchvalue2",
"case_insensitive": true
}
}
}
]
}
I've tried many different ways, but NEST seems to optimize this always to:
"bool": {
"must": [
{
"term": {
"documentTags.value": {
"value": "searchvalue1",
"case_insensitive": true
}
}
},
{
"term": {
"documentTags.value": {
"value": "searchvalue2",
"case_insensitive": true
}
}
}
]
}
The query does not deliver the same result used in a nested query.
Describe the solution you'd like A way to construct the above mentioned query.