X
Xata4mo 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
Storm4mo 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