I have a scope query that retrieves all items that contain includedinsearch field with value searchable but I also need it to exclude an item when this item has EndDate or EventEnd field with values earlier than today.

example query:

custom:includedinsearch|"searchable";custom:EndDate|[NOW/DAY TO *];custom:EventEnd|[NOW/DAY TO *]

enter image description here

  • What is your search provider? And if Solr - what is that actual problem?
    – Gatogordo
    Dec 2 '19 at 15:12
  • yes, it's Solr. the problem is I have some items -of different templates- that have a filed called "includedinsearch" with the value "searchable" but some of these items have "EndDate" field and some others have "EventEnd" field and some templates dont have either of these 2 fields. I just want the query to include the date fields in case they exist in the template, and in case they do, validate that the date is after today. Dec 3 '19 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.