Extension to use full text search from postgresql in ormar ORM.
Project description
ormar-postgres-full-text
Extension to use full text search from postgresql in ormar ORM.
Install
pip install ormar-postgres-full-text
Usage
For usage example refer to examples/basic_example/main.py
Caveat
TSVector is not a textual data type. Although you pass a string as the value, postgres would transform it internally and represent it as bag of words, so when retrieving a model containing TSVector, the value will be different than the one you provided initially.
>>> await FulltextModel.objects.create(text="hello world")
>>> (await FulltextModel.objects.filter(text__match="hello").first()).text
"'hello' 'world'"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ormar-postgres-full-text-0.1.0.tar.gz
.
File metadata
- Download URL: ormar-postgres-full-text-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.9.14 Darwin/22.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6235d18fc861b4e6923e8a62045ac5d6be26dab982a9b20f7e10b9ba0a274e89 |
|
MD5 | 08418df60c5d784b76d5d0c449dbdd0e |
|
BLAKE2b-256 | db6a26b05eacea9d6efd0d5aa1b688a62836e13f94d4d9e54b80a42aac376cfd |
File details
Details for the file ormar_postgres_full_text-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: ormar_postgres_full_text-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.9.14 Darwin/22.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01c3bccb29e31696302c43909dfe7c05207ed3bbdf637ef2c4c42578c58fbd2c |
|
MD5 | aef704d63ff9a9cf928aa252111776d3 |
|
BLAKE2b-256 | 956ac611f2bc1c14c47c0abb217167638251072db4fd7b989d7281b9a58318c7 |