All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Low Search Calendar and orderby

Yujin 25 Aug 2015 22:19 question, complete

Hi Low, I am using Low Search Calendar with the calendar:method="cal".

I am testing orderby options like relevance, date, and title/event_title. I am not noticing any changes to the list order - seems only to do by date.

Is this because {exp:calendar:cal} has no orderby parameters?

Replies

  1. Low 26 Aug 2015 07:34

    Most likely because of that, yes. Try using calendar:method="events" instead.

  2. Yujin 26 Aug 2015 14:47

    Thanks, Low. For our needs, unfortunately, that won't work since method="events" or {exp:calendar:events} doesn't output each occurrence except within the event with variable pairs {occurrences}{/occurrences}.

    We would need each occurrence to have its own listing as an event like what happens with method="cal". Viewer might miss an event occurrence on a particular day if it can only be listed together in one event listing.

    If we were to use method="events", would orderby="relevance" work?

  3. Low 26 Aug 2015 15:12

    Actually, orderby="relevance" will never work. The correct syntax is orderby="low_search_score", and that only works with keyword searches and without using the calendar:method="" param.

    To list all occurrences, you could also try to use calendar:method="occurrences".

  4. Yujin 26 Aug 2015 17:37

    Got it. So low_search_score is not compatible with the Calendar tags. That's too bad.

    I looked at method="occurrences", but it looks like it still groups occurrences with the event since it sorts by event_start_date (and not occurrence_start_date), so you don't have a straight order by date display on occurrences. But it does order by title. So might have to use "cal" for order by date and "occurrences" for order by title.

    Separate question: When doing a keyword search on events using method="cal", does it search the calendar name? From what I see in the EE debug, the keyword is searched in index_text, and I am not sure if the calendar name is in the collection index. And if we have a relationship of a venue to an event, does it search the venue title? From some quick testing, it doesn't seem to be catching all the entries with a keyword from the calendar or the venue, so trying to see how to address this.

  5. Low 26 Aug 2015 20:14

    I'm not sure what the Calendar fieldtype returns as searchable data. If it contains the calendar name, then yes, it can be searchable.

    Relationship fields don't return anything searchable (Playa does), but someone made an extension to add related entry titles to the search index: https://devot-ee.com/add-ons/low-sear...

  6. Yujin 26 Aug 2015 20:45

    Doesn't look like the calendar name is in the index even if you make Calendar's Date & Options field searchable. Will have to figure a way to add it.

    Thanks for the relationship add-on. That addressed that issue. Can search on the venue now.