Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi there,
I've got to query in Examine on 2 date fields: startDate and endDate. Startdate OR enddate should be in a certain range..
I've build up my query with mostly ANDs and finally I do:
query
.And()
.Range(dateField, startDate, endDate);
But if I'll do this next:
.Or()
.Range(dateField2, startDate, endDate);
It doesn't give the wanted result. I want these two Ranges in a GroupedOr... So it will look like this:
{ SearchIndexType: , LuceneQuery: -umbracoNaviHide:1 -parentID:1 -isPublished:0 +(nodeTypeAlias:productionevent) +lowestPrice:0 -tipped:1 + (startdateRewritten: [20150416000000 TO 20160417235859] enddateRewritten:[20150416000000 TO 20160417235859]) }
Can anyone help me with this one?
Remko,
You may need todo this one as a raw query not sure if you can do grouped or with Examine fluent api on 2 date fields.
Regards
Ismail
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Examine query question 2 date ranges in OR relation
Hi there,
I've got to query in Examine on 2 date fields: startDate and endDate. Startdate OR enddate should be in a certain range..
I've build up my query with mostly ANDs and finally I do:
query
.And()
.Range(dateField, startDate, endDate);
But if I'll do this next:
query
.Or()
.Range(dateField2, startDate, endDate);
It doesn't give the wanted result. I want these two Ranges in a GroupedOr... So it will look like this:
{ SearchIndexType: , LuceneQuery: -umbracoNaviHide:1 -parentID:1 -isPublished:0 +(nodeTypeAlias:productionevent) +lowestPrice:0 -tipped:1 + (startdateRewritten: [20150416000000 TO 20160417235859] enddateRewritten:[20150416000000 TO 20160417235859]) }
Can anyone help me with this one?
Remko,
You may need todo this one as a raw query not sure if you can do grouped or with Examine fluent api on 2 date fields.
Regards
Ismail
is working on a reply...