You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
am using opensearch client for .net, and I realized that if I use the below query. However the values to be added in Query(item) are coming as parameters in a functions and may be null. I was wondering if in the below syntax query if for example request.field is null, does the condition getting discarded or it looks for null values in the database?
My actual experience was that it ignores the specific AND condition, but I would like to doble check with you guys.
What/Why
What are you proposing?
This is not an actual proposal, but a question.
What users have asked for this feature?
am using opensearch client for .net, and I realized that if I use the below query. However the values to be added in
Query(item)
are coming as parameters in a functions and may be null. I was wondering if in the below syntax query if for examplerequest.field
is null, does the condition getting discarded or it looks for null values in the database?My actual experience was that it ignores the specific AND condition, but I would like to doble check with you guys.
var searchResponse = client.Search<ModelToCheck>(s => s.Index("opensearch index") .From(0) .Size(10) .Query(q => q .Bool(b => b .Filter(f => { return f.DateRange(dr => dr .Field(field => field.TrDate) .GreaterThanOrEquals(request.FromDate) .LessThanOrEquals(request.ToDate)) && f.Match(m => m.Field(fi => fi.field1).Query(request.field1)) && f.Match(m => m.Field(fi => fi.field2).Query(request.field2)) && f.Match(m => m.Field(fi => fi.field3).Query(request.field3)) && f.Match(m => m.Field(fi => fi.field4).Query(request.field4)) && f.Match(m => m.Field(fi => fi.field5).Query(request.field5)) && f.Match(m => m.Field(fi => fi.field6).Query(request.field6)); }))));
What problems are you trying to solve?
Trying to simplify a dynamic opensearch query when we have dynamic values
What is the developer experience going to be?
if the value inside
.Query()
is null, ignore that operand section.Are there any security considerations?
We need to clarify on a conf whether to search for null values or to ignore the query if the value parameter is null.
Are there any breaking changes to the API
What is the user experience going to be?
Are there breaking changes to the User Experience?
Why should it be built? Any reason not to?
What will it take to execute?
Any remaining open questions?
The text was updated successfully, but these errors were encountered: