# Full-text search (Prisma ORM v7) (/docs/orm/v7/prisma-client/queries/full-text-search) > For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL. Learn how to search text fields with Prisma Client using your database's native full-text search support. Location: ORM > v7 > Prisma Client > Queries > Full-text search Prisma Client supports full-text search for MySQL and for PostgreSQL with the `fullTextSearchPostgres` preview feature. ## Enabling full-text search for PostgreSQL [#enabling-full-text-search-for-postgresql] Add the preview flag to your generator and re-generate Prisma Client: ```prisma title="schema.prisma" generator client { provider = "prisma-client" output = "./generated" previewFeatures = ["fullTextSearchPostgres"] } ``` #### bun ```bash bunx prisma generate ``` #### pnpm ```bash pnpm prisma generate ``` #### yarn ```bash yarn prisma generate ``` #### npm ```bash npx prisma generate ``` ## Search within a text field [#search-within-a-text-field] ```ts const posts = await prisma.post.findMany({ where: { body: { search: "cat | dog", }, }, }); ``` ## Sort by relevance [#sort-by-relevance] Prisma Client also supports relevance-based ordering on supported databases: ```ts const posts = await prisma.post.findMany({ orderBy: { _relevance: { fields: ["title"], search: "database", sort: "desc", }, }, }); ``` ## Related pages [#related-pages] * [Filtering and sorting](https://www.prisma.io/docs/orm/v7/prisma-client/queries/filtering-and-sorting) * [Prisma Client API reference](https://www.prisma.io/docs/orm/v7/reference/prisma-client-reference#search) * [Preview features](https://www.prisma.io/docs/orm/v7/reference/preview-features/client-preview-features) ## Related pages - [`Aggregation, grouping, and summarizing`](https://www.prisma.io/docs/orm/v7/prisma-client/queries/aggregation-grouping-summarizing): Use Prisma Client to aggregate, group by, count, and select distinct. - [`CRUD`](https://www.prisma.io/docs/orm/v7/prisma-client/queries/crud): Learn how to perform create, read, update, and delete operations - [`Excluding fields`](https://www.prisma.io/docs/orm/v7/prisma-client/queries/excluding-fields): Learn how to exclude fields from Prisma Client results with the omit option. - [`Filtering and sorting`](https://www.prisma.io/docs/orm/v7/prisma-client/queries/filtering-and-sorting): Learn how to filter Prisma Client queries with where and sort results with orderBy. - [`Pagination`](https://www.prisma.io/docs/orm/v7/prisma-client/queries/pagination): Learn how to paginate Prisma Client query results with offset pagination and cursor-based pagination.