X
Xata6mo ago
Storm

Is it possible to do a sorted search?

I have this code and I want to sort the result by the created_at field
const profiles = await xata.search.all(searchQuery, {
tables: [
{
table: 'cv_theque_profiles',
filter: {
is_active: true,
},
},
],
page: {
size: 10,
offset: 0,
},
fuzziness: 1,
})
const profiles = await xata.search.all(searchQuery, {
tables: [
{
table: 'cv_theque_profiles',
filter: {
is_active: true,
},
},
],
page: {
size: 10,
offset: 0,
},
fuzziness: 1,
})
1 Reply
Storm
StormOP6mo ago
I'm thinking of using Date booster the created_at column, is that the right approach? and it worked! I'll leave this here for anybody who needs it.
Want results from more Discord servers?
Add your server