[Feature]: Add Postgres search extension pg_search #1926
Open
Description
Describe the feature
Install search extension pg_search
from ParadeDB.
This will enable an 'Elastic Search like' search index inside Postgres.
https://docs.paradedb.com/deploy/self-hosted/extensions
Suggestion or Example of how the feature would be used
As part of your SQL migration scripts you have to create the search index you need:
CREATE INDEX search_idx ON mock_items
USING bm25 (id, description, category, rating, in_stock, created_at, metadata, weight_range)
WITH (key_field='id');
Then you can use @@@
operator to do text search:
SELECT description, rating, category, paradedb.score(id)
FROM mock_items
WHERE description @@@ 'shoes' OR category @@@ 'footwear' AND rating @@@ '>2'
ORDER BY score DESC, description
LIMIT 5;
More information on how to use it here
Duplicate declaration
- I have searched the issues and this feature has not been requested before.