-
-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
We have a query builder constructing a nested query, so value of registration deadline or end date need to be between DateTime.Now
and DateTime.MaxValue
.
if (_hasEnded.HasValue && _hasEnded.Value == false)
{
query.And().Group(x =>
{
return x.RangeQuery<DateTime>(new[]
{
Constants.Examine.CourseInstance.FieldNames.RegistrationDeadline
}, DateTime.Now, DateTime.MaxValue)
.Or()
.RangeQuery<DateTime>(new[]
{
Constants.Examine.CourseInstance.FieldNames.EndDate
}, DateTime.Now, DateTime.MaxValue);
});
}
this has been simplified a bit.
which generates a Lucene query like:
+__IndexType:courseinstance +hideFromSearch:0 +(categoryID:42291) +isCancelled:0 +((registrationDeadline:[638128410874010000 TO 3155378975999990000]) (endDate:[638128410874010000 TO 3155378975999990000])) +(categoryID:42291) +isCancelled:0 +((registrationDeadline:[638128411018970000 TO 3155378975999990000]) (endDate:[638128411018970000 TO 3155378975999990000]))
The raw query executed in Examine dashboard shows results:
but not mapped to ISearchResults
:
when I comment this part I get results:
Umbraco v10.4.0
Examine v3.0.1
Metadata
Metadata
Assignees
Labels
No labels