Skip to main content

A drop-in replacement for the Haystack Elasticsearch backend which allows multilingual indexes for Django.

Project description

A multilingual Haystack plugin for Django and Elasticsearch. The module is a drop-in replacement for the Haystack ElasticsearchSearchEngine.

Instead of a single index it creates an index for each language specified in settings.LANGUAGES.

A query is routed to the index of the currently active language.

https://travis-ci.org/sbaechler/django-multilingual-search.svg?branch=master

Installation

Install with pip:

pip install django-multilingual-search

The major and minor versions of this project correspond to the Haystack version the package was tested against. This version is for Haystack 2.4.

Configuration

The app provides a drop-in replacement for the ElasticsearchEngine of Haystack. To use it, specify this engine in settings.py:

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'multilingual.elasticsearch_backend.ElasticsearchMultilingualSearchEngine',
        'URL': 'http://127.0.0.1:9200/',
        'INDEX_NAME': 'myproject',
    },
}

For automatic indexing of new entries the Haystack signal processors can be used without modification. It is recommended that a custom SignalProcessor be used instead of the RealtimeSignalProcessor because of server timeout issues with the latter.

Contributing

Please read the Contributing guide.

Release History

  • 2.4.1: Add compatibility with Django-parler.

  • 2.4.0: Update code for compatibility with Haystack 2.4

  • 2.3.0: First release

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-multilingual-search-2.4.1.beta2.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file django-multilingual-search-2.4.1.beta2.tar.gz.

File metadata

File hashes

Hashes for django-multilingual-search-2.4.1.beta2.tar.gz
Algorithm Hash digest
SHA256 62246eed72e1ef66422cdfc65c57ace21cf396c613d2b4c4698016de3b45ae70
MD5 65a0e6eca97ad2898c50745568c11527
BLAKE2b-256 2048127992d8873504c37c774f616ee9f9a4e1e29821bdd0d8a2dd9e7027467c

See more details on using hashes here.

Supported by

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