I’m trying to filter results in my Algolia query based on the date. In Bubble, I save each record with a UNIX timestamp that is uploaded to Algolia. Basically, what I need is to ensure that when someone runs a search on my Bubble app, Algolia only returns records uploaded within the past week. I tried using the following filter in the Simple Search plugin filter input:
let weekAgo = Date.now() - 604800000;
index.search(‘query’, {
filters: timestamp > ${weekAgo}
}).then(({ hits }) => {
console.log(hits);
});
However, no results are returned. I have index set up properly as an attribute available for faceting as well. Any advice on how to get this working would be greatly appreciated. Thank you in advance!