Documentation needed for Search API Indexing

Created on 25 April 2024, 2 months ago
Updated 3 May 2024, about 2 months ago

Problem/Motivation

I'm setting up a Search API (Meilisearch) instance and have run into configuration questions around SmartDate and indexing repeating events. I can't find any documentation about how the "Smart Date override" and "Smart date recurring rule" sections work in the 'Mange Fields for * Index' section. Despite adding fields to those sections, I've never seen a noticeable result. Can anyone shed any light on how these fields work or point me towards some documentation? Thanks for your time!

πŸ’¬ Support request
Status

Active

Version

4.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States butterfi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @butterfi
  • πŸ‡¨πŸ‡¦Canada mandclu

    Smart Date stores its date values as timestamps, the same as how core stores values for content creation and last updated. For recurring dates, all the values generated on save are in the database as extra field values, so that they can be selected by views, entity queries, and so on.

    As such, if you are indexing the values of a Smart Date field, any recurring values should be included.

    Can you elaborate on what you mean by "I've never seen a noticeable result"? What are you expecting to see that you aren't?

  • πŸ‡ΊπŸ‡ΈUnited States butterfi

    When I index the smart date field ("event date") which typically has repeating events (i.e. held every Wednesday), I get a single event entry with an array of dates, which is I believe is the expected behavior. What I think Meilisearch wants is a separate index line for each event as it doesn't know what to do with an array of timestamps. When creating the Search Index, I can add fields to the 'Content' section, but there are two other sections offered: "Smart Date Overide" and "Smart Date recurring rule" and this is where I'm puzzled. How are these areas meant to be configured? I can add fields to them, but I don't see any impact. I'm not even confident the fields being added have values. (See attached)

    Thanks for your time!

  • πŸ‡¨πŸ‡¦Canada mandclu

    Smart Date Date Recurring Rules store the information for any recurring events: Information about the entity on which the event appears, and then frequency and other information needed to generate the individual dates. Smart Date Overrides are the entities used to store variations from the standard instances of a recurring rule: a different start and/or end time, or nothing at all to signify that an instance is cancelled.

    I'm not sure that either of these will help, however. I'm a little surprised that Meilisearch "doesn't know what to do with an array" of values. Is it not able to handle multivalued fields?

  • πŸ‡ΊπŸ‡ΈUnited States butterfi

    As I've been digging into this issue, I have found several sources that have led me to the belief that Meilisearch really only wants one date. Its my understanding that Meili flattens arrays, which for indexes with Taxonomy fields is fine - the term id gets translated to the label and Meili just parses the whole thing as a string.Thats great for taxonomy terms, but doesn't help populating repeat events. I'll keep poking, but I think for now, I'm going to keep using Views for the Events date

Production build 0.69.0 2024