Search for Kirby: Algolia integration, data types

Algolia integration using the plugin Search for Kirby by @distantnative works like a charm. But I wonder why all the attributes of the index created by the plugin are of type string:

In this example jahr is a number field in Kirby. Shouldn’t it be of type numeric in Algolia? I’m having trouble setting up the range input widget, and my best guess is that it’s the wrong data type.

Also I’m not sure about empty fields being empty stings in Algoila. Shouldn’t it be null?

To be honest, the plugin doesn’t set up any Algolia field types at all. So string is just the default. Since we will search with a query string later on, I’m not sure what a difference using other field types would make – but my understanding of Algolia might be limited here.

According to the Docs, Algolia does differntiate between data types. https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/#algolia-records

Especially for frontend widgets like rangeInput or rangeSlider, numeric data is mandatory. See “Requirements” here: https://www.algolia.com/doc/api-reference/widgets/range-input/js/

It would be nice if the plugin would match the field types at least for num fields.
Should I create an issue on GitHub?

Yes, please create an issue :slight_smile:

Done. :ok_hand: