How we can use Search Query in Elastic.Clients.Elasticsearch

'''var response = await _client.SearchAsync(s => s
.Index("indici_timeline_death_patient_vector_ml")
.From(0)
.Size(10)
.Query(q => q
.Bool(b => b
.Must(m => m
.Term(mu => mu.Field(f => f.patientid).Value(formData.PatientID)),
m => m.Term(mu => mu.Field(f => f.practiceid).Value(formData.PracticeID)),
m => m.Terms(ts => ts.Field("eventtypeid")
.Terms(new Elastic.Clients.Elasticsearch.QueryDsl.TermsQueryField(formData.EventIDs.Select(id => FieldValue.Long(id)).ToArray())))
)
)
)
);
}'''
Here is my code. And i am using Elastic.Clients.Elasticsearch library.
i made three queries in must clause and i want that:
1: When i send Patiendid , Practiceid and "empty" Search then the data should be showed on PatientID and PracticeID.
2: When i send Patiendid , Practiceid and "wrong" Search then nothing should be showed. No Patiendid , no Practiceid and no Search.
3: When i send Patiendid, Practiceid and "correct" Search then the data should be showed according to them.
That is why i keep these three quires in must but i do not know how can i achive this thing . I hope you understood my scenario. I will wait of you replay . Thank you very much.Preformatted text

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.