Hello!
I'm new to using Elasticsearch and trying to get my head around the Query DSL for the .NET package: Elastic.Clients.Elasticsearch. I have a basic query set-up as such:
Ids excludeIds = new Ids(new List<Id> { 351, 4826, 4823, 9, 10, 11 });
var searchResponse = await client.SearchAsync<Document>(s => s
.Index(INDEX_NAME)
.From(0)
.Size(50)
.Query(q => q
.Bool(b => b
.MustNot(m => m
.Ids(new IdsQuery() { Values = excludeIds })))
.MultiMatch(mm => mm
.Query(text)
.Fields("description, title")
)
)
);
However, it appears depending on the ordering of the Bool/MultiMatch queries, they appear to overwrite each other.
Can someone help me identify the correct syntax so that both queries would be included?