Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Note | 605 | 4 years ago | 3 | Python | ||||||
学习笔记 | ||||||||||
Django Sphinx | 354 | 6 | 8 years ago | 9 | April 19, 2011 | 29 | other | Python | ||
A transparent layer for full-text search using Sphinx and Django | ||||||||||
Onadata | 176 | 8 days ago | 137 | other | Python | |||||
Collect, Analyze and Share | ||||||||||
Django Fias | 103 | 3 years ago | 27 | April 24, 2019 | 22 | other | Python | |||
Django Docs | 60 | 10 | 3 | 6 months ago | 7 | November 19, 2018 | 9 | bsd-3-clause | JavaScript | |
Allows to serve Sphinx generated docs from django. | ||||||||||
Jwql | 58 | 2 days ago | 14 | April 05, 2022 | 148 | bsd-3-clause | Python | |||
The James Webb Space Telescope Quicklook Application | ||||||||||
Django Book | 58 | 10 years ago | Python | |||||||
django book 3.0 | ||||||||||
Sphinxcontrib Django | 38 | 17 days ago | 1 | apache-2.0 | Python | |||||
This is a sphinx extension which improves the documentation of Django apps. | ||||||||||
Django Sphinxql | 37 | 5 years ago | 3 | March 09, 2017 | 4 | other | Python | |||
Sphinx search in Django | ||||||||||
Django Public Admin | 33 | 3 years ago | 5 | October 22, 2020 | 2 | mit | Python | |||
🔓 A public and read-only version of the Django Admin |
This is a fork of django-sphinx
devoid of its shortcomings.
Note: Now only works in conjunction Django + Mysql + SphinxSearch.
To install the latest development version (updated quite often):
git clone git://github.com/adw0rd/django-sphinxsearch.git cd django-sphinxsearch python setup.py install
Note: You will need to install the sphinxapi.py package into your Python Path or use one of the included versions. To use the included version, you must specify the following in your settings.py file:
# Sphinx 0.9.9 and above SPHINX_API_VERSION = 0x116 # Sphinx 0.9.8 SPHINX_API_VERSION = 0x113 # Sphinx 0.9.7 SPHINX_API_VERSION = 0x107
The following is some example usage:
from djangosphinxsearch.managers import SearchManager class MyModel(models.Model): search = SearchManager() # The default "index_name" is taken from the SPHINX_INDEX_PREFIX + MyModel._meta.db_table # Or you can specify the "index_name" like this: search = SearchManager('index_name') # Or maybe we want to be more.. specific searchdelta = SearchManager( index='index_name delta_name', fields={ 'name': 100, 'description': 10, 'tags': 80, }, mode='SPH_MATCH_ALL', rankmode='SPH_RANK_NONE', limit=100 ) queryset = MyModel.search.query('query') results1 = queryset.filter(my_attribute=5) results2 = queryset.exclude(my_attribute=5)[0:10] results3 = queryset.count()
If you can not specify a manager in the model, you can use this:
from djangosphinxsearch.managers import SearchManager from django.contrib.comments import Comment Comment.search = SearchManager(index="my_index_for_comments", fields={'name': 50, 'description': 200}) Comment.search.contribute_to_class(model=Comment, name="search") queryset = Comment.search.query('test', indexes='my_custom_index_for_comments')
Russian topic: http://pyha.ru/forum/topic/7894.0