"Projection/Select" in search queries?

I've been adding text search to my site and was trying to figure out a way to limit the amount of data sent back to the client. Is there a natively supported way to only select/return a specific set of columns using search, whilst still searching those columns? Specific example, I want to search article content, but do not need to return the whole content body, I only need the names and id's of the articles that matched over n many points. My temporary solve is using a map to post process the records before returning them, but I was wondering if there was a more direct way to do that like you can with projection in MongoDB or the select limits the return body.
1 Reply
cmck
cmck2d ago
At the moment, there is no way to limit the number of columns returned in a record when searching. The whole record(s) is returned. You can filter before the search which should help limit the amount of data returned.
Searching records
Effectively search records using the Xata SDK with TypeScript or JSON
Want results from more Discord servers?
Add your server