SQL
SQL
ParadeDB comes with a helpful procedure that creates a table populated with mock data to help
you get started. Run the following command to create this table.Then, inspect the first 3 rows:Next, let’s create a BM25 index called You’re all set! Try running some queries.
Expected Response
search_idx on this table. A BM25 index is a covering index, which means that multiple columns can be included in the same index.As a general rule of thumb, any columns that you want to filter,
GROUP BY,
ORDER BY, or aggregate as part of a full text query should be added to the
index for faster performance.Note the mandatory
key_field option. See choosing a key
field for more
details.Django
Django
To start you’ll need a Django project with psycopg and django-paradedb installed. Run the following to create one:In We can now add a model for ParadeDB’s built-in test table and BM25 index:Run the migrations to create the table and index:Now, open a Python shell with You’re all set! Try running some queries in your Python shell.
myproject/settings.py, add 'django.contrib.postgres' and 'myapp' to INSTALLED_APPS. Then, configure DATABASES["default"] to point to Postgres:myproject/settings.py
models.py
As a general rule of thumb, any columns that you want to filter,
GROUP BY,
ORDER BY, or aggregate as part of a full text query should be added to the
index for faster performance.Note the mandatory
key_field option. See choosing a key
field for more
details.python3 manage.py shell and run the following command to populate mock_items.SQLAlchemy
SQLAlchemy
Setup instructions coming soon!
Rails
Rails
Setup instructions coming soon!