Or terms query

I'm using NEST to build a dynamic query. I trying to do something like:

"Get results having property 'DateDeleted' in date range {A} or in date range {B}."

I was trying different approaches but something is wrong is I getting wrong results..

This is what I was trying to do:

                 var queryDescriptor = new QueryContainerDescriptor<JobDocument>();

                  queryContainer &= (queryDescriptor.DateRange(a => a
                        .Field(f => f.DateDeleted)
                        .GreaterThan(sampleDate)) |

                        queryDescriptor.DateRange(a => a
                        .Field(f => f.DateDeleted)
                        .LessThan(new DateTime(1980, 1, 1))));

How I can combine two 'DateRange' queries using "OR" condition?

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