Custom Search Implementation #15767
Dan6erbond
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The
admin.listSearchableFieldsconfiguration lets us define fields to perform anilikeagainst when the user searches in the table view. But with vector search becoming increasingly popular these days thanks to the AI providers offering embeddings we've found a use-case for a custom search implementation, or even if we just wanted to provide FTS rather thanilike.It would be great if devs could provide an
async listSearchFilterOptions(props: { search: string }): Where | Promise<Where>that takes the search input and returns the where-clause for Payload to apply to the records. That way I could run an embeddings/FTS that returns the IDs of the documents that match and return{ where: { id: { in: ids } } }.Ideally we could also provide a
listSearchPlaceholderto update the placeholder from "Search by..." to "Search" or "Semantic Search" or whatever makes sense.Beta Was this translation helpful? Give feedback.
All reactions