2 Sphinx Search Engine ORM for Django models
3 http://www.sphinxsearch.com/
4 Developed and maintained David Cramer <dcramer@gmail.com>
6 To add a search manager to your model:
8 search = SphinxSearch([index=<string>, weight=[<int>,], mode=<string>])
11 To query the engine and retrieve objects:
13 MyModel.search.query('my string')
16 To use multiple index support, you need to define a "content_type" field in your SQL
17 clause. Each index also needs to have the exact same field's. The rules are almost identical
18 to that of an SQL UNION query.
20 SELECT id, name, 1 as content_type FROM model_myapp
21 SELECT id, name, 2 as content_type FROM model_myotherapp
22 search_results = SphinxSearch()
23 search_results.on_index('model_myapp model_myotherapp')
24 search_results.query('hello')
27 default settings.py values
29 SPHINX_SERVER = 'localhost'
34 from manager import SearchError, ConnectionError, SphinxSearch
35 from utils import generate_config_for_model, generate_config_for_models