Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ormar-postgres-full-text-0.1.0.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

ormar_postgres_full_text-0.1.0-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page