Skip to main content

Pure Postgresql search backend for Django Oscar

Project description

Maintainability Maintainability https://codecov.io/gh/snake-soft/django-oscar-pg-search/branch/master/graph/badge.svg?token=TALCIZ5E3Q https://img.shields.io/badge/License-GPLv3-blue.svg

Postgresql search handler for Django-Oscar

Careful: This is originally created inside a project not tested in a reusable environment, yet.

This creates a search handler without the need of any search backend. It is designed for the e-commerce framework Oscar.

It is implemented a little bit expensive but uses 4 annotated search vectors: * upc * title * meta_description * meta_title

This way the search can be manipulated through the meta fields. This package is not testet against generic sites, yet. It is running productive in a heavily customized env for many months now. I think it should scale up to 5000 Products with 10 Attributes depending on how the products are loaded. We use it fully lazy with endless scrolling.

To-Do

  • Dynamic creation of the filter fields

  • Writing Tests

Features

  • Don’t need to use some additional search backend like elastic

  • Creates filters (facets) for:
    • Data that is directly attached to the Product model including foreign key choices

    • AttributeValues of the products

    • StockRecord entries

Installation

Install using pip:

pip install django-oscar-pg-search
# settings.py
INSTALLED_APPS = [
    # ...
    'oscar_pg_search.apps.PgSearchConfig',
    # ...
]
OSCAR_PRODUCT_SEARCH_HANDLER = 'oscar_pg_search.postgres_search_handler.PostgresSearchHandler'

Settings

If you want to add some fields that are directly attached to the Product model:

# settings.py
OSCAR_ATTACHED_PRODUCT_FIELDS = ['is_public', 'deposit', 'volume', 'weight',]

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

django-oscar-pg-search-0.8.9.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

django_oscar_pg_search-0.8.9-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file django-oscar-pg-search-0.8.9.tar.gz.

File metadata

  • Download URL: django-oscar-pg-search-0.8.9.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for django-oscar-pg-search-0.8.9.tar.gz
Algorithm Hash digest
SHA256 454527aea7f63372b9d558b3a8fb27ef14512f0ca1bf3954bce3435a23b67c70
MD5 fcd81d0020135fa2a12eb4a102b79e82
BLAKE2b-256 15a3347a19107d191cb1b57999924e5ef6a39513210bf32fe8217549ff9580c3

See more details on using hashes here.

Provenance

File details

Details for the file django_oscar_pg_search-0.8.9-py3-none-any.whl.

File metadata

  • Download URL: django_oscar_pg_search-0.8.9-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for django_oscar_pg_search-0.8.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2f979461a4bf1f679af116a540c74fd1fc1c427a78aa2a2511042dd5e940ef54
MD5 d3c9ab48cf613e6d32de1cbd91e11968
BLAKE2b-256 629989abfb9c4f6bc620a3502adecadc67f0e66c5fbe9a73fa2223f595d9282d

See more details on using hashes here.

Provenance

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