import { getXataClient } from "@/app/xata";
const xata = getXataClient();
export const searchInvoice = async (phrase: string) => {
const results = await xata.db.invoice.search(phrase, {
target: ["customer.name", "products", "address"],
fuzziness: 1,
prefix: "phrase",
});
return results;
};
import { getXataClient } from "@/app/xata";
const xata = getXataClient();
export const searchInvoice = async (phrase: string) => {
const results = await xata.db.invoice.search(phrase, {
target: ["customer.name", "products", "address"],
fuzziness: 1,
prefix: "phrase",
});
return results;
};