Skip to content

[Algolia integration] DateTime properties are not sortable due to the DateTime.ToString() call when building an index. #209

@giuunit

Description

@giuunit

This issue is linked to the Umbraco.Cms.Integrations.Search.Algolia plugin.

When calling the Search/BuildIndex endpoint to build an index based on doc types using the umbraco backoffice plugin, the generic date properties like createDate and updateDate are serialized into string using the DateTime.ToString() function. It is an issue as this function relies on the current culture of the server and doesn't allow for an easily sortable date to sort for algolia.

Algolia suggests to convert the dates into Unix timestamps here: https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-an-index-by-date/#convert-dates-into-unix-timestamps-an-example to make them sortable.

A pull request is on the way. Thank you.


This item has been added to our backlog AB#43864

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions