ang-zeyu / infisearch

Easy and flexible client-side search for static sites
https://infi-search.com
MIT License
41 stars 1 forks source link

Support integer/timestamp/numeric fields #5

Closed ang-zeyu closed 1 year ago

ang-zeyu commented 1 year ago

This could be a generalisation of #4.

Documents may have associated numeric values, the most common of which would be timestamps (e.g. blog posts made on a certain date).

Morsels only indexes texts, but these can be mapped to integer values through some configuration (e.g. parsing a datetime string with a specific format into a 64bit unix timestamp).

On the API side, there could be support for:

On the UI side,

In terms of priority, timestamp fields should come first. The use case for generic numeric fields in static site search may be less common.

ang-zeyu commented 1 year ago

https://github.com/ang-zeyu/infisearch/commit/4ee3f81b9feb21f0bf275dbbd0257ba85facbfff