Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Add Postgres search extension pg_search #1926

Open
1 task done
carlos-verdes opened this issue Nov 29, 2024 · 0 comments
Open
1 task done

[Feature]: Add Postgres search extension pg_search #1926

carlos-verdes opened this issue Nov 29, 2024 · 0 comments
Labels
S-Triage Awaiting decision for what to do T-Feature Request A request for a new feature

Comments

@carlos-verdes
Copy link

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.
@carlos-verdes carlos-verdes added S-Triage Awaiting decision for what to do T-Feature Request A request for a new feature labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Triage Awaiting decision for what to do T-Feature Request A request for a new feature
Projects
None yet
Development

No branches or pull requests

1 participant