How to make solr filter query in opencms with future release date

0

I am working on opencms 10.5, I have added a list that calls all events without problem, now I want to show only future events from today up to 10 months using the option "Availability-> Release / expiration date-> Release date "in the event (event), I used the filter & fq = released: [NOW TO NOW + 10MONTH] in the list, the drawback now is that as the publication date has not arrived this event is only shown in the mode edition and not in production,

Can someone help me with any idea or other option to achieve these events?

    
asked by sacrom 13.06.2017 в 01:17
source

1 answer

0

You should have a Date field in the content and filter the contents to be displayed on that field, for example:

  • Field in content (.xsd) = FechaEvento
  • searchsettings (.xsd) add
  • <searchsetting element="FechaEvento" searchcontent="false">
        	<solrfield targetfield="FechaEventoDate" sourcefield="*_dt"/>
        </searchsetting>
  • The filter (in Spanish) would be &fq=FechaEventoDate_es_dt:[NOW TO NOW+10MONTH]
  • The fields Launch (Availability) and Expiracion (Expiration) I do not recommend that you use them for that.

        
    answered by 23.05.2018 в 11:48