Search Table | Xata
@raae (queen.raae.codes) the stream was awesome! 😻 Regarding search highlighting, you were right, you need to pass something to the request:
highlight: {enabled: true}
and then you get the highlights in the response (from https://xata.io/docs/api-reference/db/db_branch_name/tables/table_name/search#free-text-search-in-a-table)17 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
that looks good, the highlights should come in the responses under
xata.highlight
here is an example, in case I'm not seeing the error either
they are in
<em>
tags, and you can change the tag if you want/needUnknown User•3y ago
Message Not Public
Sign In & Join Server To View
ah, one sec, I think you need
getMetadata()
in the SDKyeah, it's maybe a bit convoluted but:
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Yes, that’s the per table search. I’ll give you an example in a bit.
@SferaDev Could it be that the SDK types don't expose
target
in the per-table search? This seems accepted but it's highlighted in redI think there's some stuff to fix in there @raae (queen.raae.codes) , thanks a lot for reporting! Using search.all should be fine in the meantime, indeed
Shouldn't it be
target: [{ column: "name" }]
. Target is where to look up for results but not filter, so Keanu Reeves there won't do anything.like this, right?
that is how it should be, indeed, but still doesn't seem to work. i think the types don't expect target at all
Okay that might be a bug, will check
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
We don’t yet have pagination, you can increase the size to max 200, I think. Let me know if that is not enough, we ca prioritize adding pagination support
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View