Hi,
in "Event" content type, i have pop-up calendar with "repeating date" enable for "event date" field. i set up "Event index" in search api for searching purpose.

I created event and set "event start date", "event end date" and repeat dates as 6 occurence.

i set up view to display list of events on events page according to "create Event index". but i can't sort according to event start day under "Sort criteria". as event date is multiple value. so i set up aggregated fields called "Aggregated event start day" under "filters" tab in "Event index" in search api, with "Fulltext" for aggregation type and "Event date >> start date" in contained fields.

then under "fields" tab, tick "Aggregated event start day" for indexed and set type as "date". then i went to click "Index Now". but i got message " i item could not be indexed. check the logs for detail". in log message is "SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'search_api_aggregation_1' at row 1". i can see "aggregated event start day" under "sort criteria" for sorting. but event with "repeat date" didn't show on the list of events page by view, as this node wasn't indexed.

If i untick "repeat date" option, i can index all of events nodes.

what i did was wrong to cause this? any suggestions and help.

and also, i have another question. what value will be return for "fulltext, sum, count, maximum, minimum and first" of aggregation type under filters tab? for the date, i used "Fulltext", then under "fields" tab, should I choose either "fulltext", or "string", or "integer". as apart from "date", node with "repeating date" can be indexed for either "fulltext", or "string" or "interger". what what kind of value those will return, as i will use this "aggregated event start day" for sorting.

thanks!
Ling

Comments

ling-drupal’s picture

Issue summary: View changes
ling-drupal’s picture

Category: Task » Support request
drunken monkey’s picture

Status: Active » Fixed

Your mistake was to use the "Fulltext" aggregation, since that results in indexed text like the following:

1435585924

1435586421

1435527324

1435586573

I.e., it will put all the timestamps into a single string and index that. If you now try to index it as a date, though, it will throw an error, since this is not a recognized date format.
What you want to do will probably work exactly as you tried it if you just use "First" instead of "Fulltext" for the aggregation.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.