Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
eab727e
Fixed doc, ``query`` is context variable and not in request.
bmihelac Aug 24, 2011
bb6ad92
Silly little change, I know.. but I actually ran into a case where I …
phill-tornroth Aug 31, 2011
1bcfb3d
Map boost field to _boost in elasticsearch.
Connorhd Feb 25, 2013
fa24d47
Update the current elasticsearch boost test to also test document boo…
Connorhd Mar 3, 2013
f87ff24
Avoid unnecessary db query on index update
stefanw Apr 22, 2013
371fd90
Improve error message for duplicate index classes
May 21, 2013
f80cb9f
Started porting to py3.
toastdriven Jun 1, 2013
942eb0a
Added haystack-rqueue to "Other Apps".
toastdriven Jun 8, 2013
8cceb69
Updated the backend support docs. Thanks to kezabelle & dimiro1 for t…
toastdriven Jun 14, 2013
d4ba652
Updated description for TIMEOUT setting
pabluk Jun 19, 2013
7812f7b
Merge pull request #810 from pabluk/minor-docs-fix
acdha Jun 19, 2013
d7e020f
More porting to Py3.
toastdriven Jun 24, 2013
8e20f84
Core tests mostly pass on Py 3. \o/
toastdriven Jun 24, 2013
8c95790
Closer on porting ES.
toastdriven Jun 28, 2013
afc5dcf
Whoosh all but fully working under Python 3.
toastdriven Jun 28, 2013
bbd9cab
Simple backend ported & passing.
toastdriven Jun 28, 2013
4629a7d
Overrides passing under Py3.
toastdriven Jun 28, 2013
9f65ddb
Elasticsearch tests passing under Python 3.
toastdriven Jun 29, 2013
ba9e4a9
Update autocomplete.rst
knightzero Jul 9, 2013
65076c9
Fix datetime instantiation in elasticsearch backend's _to_python
Jul 17, 2013
d0dcf89
Add test__to_python for elastisearch backend
Jul 17, 2013
831d738
Added ethurgood to AUTHORS.
toastdriven Jul 18, 2013
88f602b
Merge pull request #744 from trigger-corp/master
bigjust Jul 27, 2013
a2508e3
Merge pull request #821 from knightzero/patch-1
bigjust Jul 27, 2013
83096ab
Solr tests all but passing under Py3.
toastdriven Jul 27, 2013
c95235e
Final core changes.
toastdriven Jul 27, 2013
5be8289
Backported things removed from Django 1.6.
toastdriven Jul 28, 2013
c275020
Whoosh mostly working under Python 3. See docs for details.
toastdriven Jul 28, 2013
aa772a5
Added Python 3 compatibility notes.
toastdriven Jul 28, 2013
e6fd7e5
Merge branch 'py3'
toastdriven Jul 28, 2013
1db3fdd
Added all the new additions to AUTHORS.
toastdriven Jul 28, 2013
a752f1f
Python 3 support is done, thanks to RevSys & the PSF! Updated require…
toastdriven Jul 28, 2013
82c9fa0
Bumped to v2.1.0!
toastdriven Jul 28, 2013
444fa21
Started the v2.1.1 work.
toastdriven Jul 28, 2013
ab9ed94
Merge pull request #795 from davesque/update_excluded_indexes_error_m…
bigjust Jul 28, 2013
5a15854
Merge pull request #407 from bmihelac/patch-1
bigjust Jul 29, 2013
16dd8e3
Merge pull request #413 from phill-tornroth/patch-1
bigjust Jul 29, 2013
9934c16
Tiny docs fix in signal_processors example code
nicholasserra Jul 29, 2013
85f41ae
Merge pull request #837 from nicholasserra/signals-docs-fix
bigjust Jul 29, 2013
e1b7269
Fixed issue #807
postatum Aug 5, 2013
7cc97b8
Merge pull request #840 from postatum/fix_issue_807
bigjust Aug 7, 2013
30afd1f
Fixed a missed raw_input call on Python 3
dcwatson Aug 13, 2013
7c560f1
Fixed an update_index bug when using multiple connections
luisbarrueco Aug 17, 2013
914f0a2
Merge pull request #847 from luisbarrueco/mgmtcmd-fix
dcwatson Aug 19, 2013
ced3b9a
Use Django's copy of six
dcwatson Aug 19, 2013
6e62bf1
Reset backend state when deleting index
Jun 4, 2013
f1ef561
Test ensuring recreating the index does not remove the mapping
Aug 22, 2013
ebfb47c
Merge remote-tracking branch 'infoxchange/fix-elasticsearch-index-set…
toastdriven Aug 22, 2013
61047a3
Fixed ordering issues in the ElasticSearch tests.
dcwatson Aug 23, 2013
ee5e8c3
Added some faceting tests for ElasticSearch.
dcwatson Sep 9, 2013
35d75f8
More ElasticSearch test fixes.
dcwatson Sep 21, 2013
36be716
Added a spelling test case for ElasticSearch.
dcwatson Sep 22, 2013
5c2dec0
Fixed my own spelling test case. How embarrassing.
dcwatson Sep 22, 2013
b8ccf8a
update tox to test pypy, py26, py27, py33, django1.5 and django1.6
bigjust Sep 7, 2013
1cfb6c6
pass `using` to index_queryset for update
bigjust Sep 7, 2013
9791c55
Update solr schema template to fix stopwords_en.txt relocation
paltman Dec 20, 2012
b7c57bd
switch solr configs to solr 4
Sep 21, 2013
7bcde9e
[tox] run tests for 1.6, fix test modules so they are found by the new
Sep 27, 2013
4956486
fixed simple backend for django 1.6, _fields was removed.
Sep 27, 2013
58ca4cd
fixed basepython for tox envs, thanks --showconfig
Sep 30, 2013
3ef5644
Fixed autocomplete() method: spaces in query
ivirabyan Feb 6, 2013
779b18a
added test for autocomplete whitespace fix
Oct 3, 2013
7db3957
removed python 1.4 / python 3.2 tox env because thats not possible
Oct 3, 2013
2324f8a
Fixed #575 & #838, where a change in Whoosh 2.5>
kezabelle Oct 5, 2013
5b3bb01
Fix documentation regarding ModelSearchIndex to match current behavior
benspaulding Oct 17, 2013
34384f3
Remove bit about SearchQuerySet.load_all_queryset deprecation
benspaulding Oct 17, 2013
85f1b87
Merge pull request #881 from benspaulding/docs/issue-606
bigjust Oct 17, 2013
07cfa63
Merge pull request #882 from benspaulding/docs/issue-607
bigjust Oct 17, 2013
ab145f3
Fixed ValueError exception when SILENTLY_FAIL=True
pabluk Jun 19, 2013
72eaf26
Added pabluk to AUTHORS
pabluk Jun 19, 2013
3bbc8b6
fixed typo in AUTHORS
Oct 22, 2013
c64d48a
Cleaner query composition when it comes to filters in ES
honzakral Oct 22, 2013
abaf9b9
Use terms filter for DJANGO_CT, *much* faster
honzakral Oct 22, 2013
4d90d7d
Merge remote-tracking branch 'HonzaKral/filtered_queries'
toastdriven Oct 27, 2013
43d1dd2
update travis config so that unit tests will run with latest solr + e…
Oct 27, 2013
ed827f6
Use HTML5 <input type=search> (closes #899)
acdha Nov 12, 2013
3502b93
Merge pull request #899 from acdha/html5-input-type=search
bigjust Nov 12, 2013
f0a6e90
Use elasticsearch-py instead of pyelasticsearch.
honzakral Oct 21, 2013
7cd6b90
Merge pull request #885 from HonzaKral/elasticsearch-py
bigjust Nov 15, 2013
60c8e52
upgraded python3 in tox to 3.3
Nov 16, 2013
daeca3a
Merge branch 'master' into avoid-pks-seen-on-update
stefanw Nov 18, 2013
7cefd67
Merge pull request #775 from stefanw/avoid-pks-seen-on-update
bigjust Nov 19, 2013
4959fc7
Fix url for solr 3.5.0
gam-phon Nov 24, 2013
e591aab
Merge pull request #907 from gam-phon/patch-1
acdha Nov 24, 2013
c18af02
Move test Solr instructions into a script
acdha Dec 18, 2013
43bdd46
tests: update requirements to match tox
acdha Dec 18, 2013
ed25a78
Tests: update Solr schema to match current build_solr_schema
acdha Dec 18, 2013
b064edc
Tests: update test_quotes_regression exception test
acdha Dec 18, 2013
c1bf639
Tests: update test_more_like_this for Solr 4.6
acdha Dec 18, 2013
4543b93
Docs: fix ReST syntax error in searchqueryset_api.rst
acdha Dec 18, 2013
c802df8
Fix bounding box calculation for spatial queries (closes #718)
acdha Dec 18, 2013
6d3daa6
Whoosh: allow multiple order_by() fields
acdha Dec 18, 2013
ab5f4b5
Allow users to pass in additional kwargs to Solr and Elasticsearch ba…
honzakral Jan 3, 2014
415cea8
Doc formatting fix
honzakral Jan 3, 2014
9d2b138
Add narrow queries as individual subfilter to promote caching
honzakral Jan 6, 2014
f7d4fad
Simplify mappings for elasticsearch fields.
honzakral Jan 6, 2014
9fdf698
Remove extra code
honzakral Jan 10, 2014
9867b29
Solr backend: run() kwargs are passed directly to search backend
acdha Jan 16, 2014
79491d5
ElasticSearch backend: run() kwargs are passed directly to search bac…
acdha Jan 16, 2014
cddc4db
No need to store fields separately in elasticsearch
honzakral Jan 17, 2014
b2b7946
Make sure DJANGO_CT and DJANGO_ID fields are not analyzed
honzakral Jan 25, 2014
6a11263
Tests: skip Solr content extraction with old PySolr
acdha Jan 26, 2014
55d5a76
Merge pull request #888 from acdha/888-solr-field-list-regression
acdha Jan 29, 2014
372b37f
Tests: update pysolr requirement to 3.1.1
acdha Jan 30, 2014
6f01d7f
Tests: remove legacy targets
acdha Jan 30, 2014
19ba167
Update tutorial.rst
boscoMW Jan 31, 2014
2b2b434
Ignore missing index during .clear()
honzakral Feb 10, 2014
fae22c5
Ignore 404 when removing a document from elasticsearch
honzakral Feb 11, 2014
194f8ae
Add a note on elasticsearch-py versioning with regards to 1.0
honzakral Feb 11, 2014
9be699f
Solr backend: correct usage of pysolr delete
acdha Feb 12, 2014
cd321ab
Fix typo with instantiating Distance units
gkaplan Feb 20, 2014
3c9a530
Merge pull request #946 from gkaplan/spatial-docs-fix
toastdriven Feb 20, 2014
8739e33
Fix logging call in SQS post_process_results (see #648)
acdha Feb 21, 2014
0928d9f
Merge pull request #938 from Mbosco/patch-1
toastdriven Feb 28, 2014
91ceeae
Fix possessive "its"
tobych Mar 10, 2014
9ac224d
Fix typo; clarify purpose of search template
tobych Mar 10, 2014
5b2cdd7
Merge pull request #968 from tobych/patch-1
bigjust Mar 10, 2014
dd2d1e8
Improve punctuation in super-scary YMMV warning
tobych Mar 10, 2014
0fe42db
Merge pull request #969 from tobych/patch-2
bigjust Mar 10, 2014
97eeeb0
Merge pull request #970 from tobych/patch-3
bigjust Mar 10, 2014
4107efc
ElasticSearch: avoid KeyError for empty spelling
acdha Mar 29, 2014
366e748
Add setup.cfg for common linters
acdha Mar 29, 2014
155d925
Fix for deprecate `Options.module_name` in favor of `model_name`
lmatoso Mar 31, 2014
67530e7
Merge remote-tracking branch 'imatoso/master' into merge_with_imatoso
manelore Jul 17, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
language: python
python:
- "2.6"
- "2.7"
- "3.2"
- "2.7"

branches:
only:
- travis-config
before_install:
- sudo apt-get update
- sudo apt-get install wajig binutils gdal-bin libproj-dev libgeos-c1 libxapian22 python-xapian default-jdk
- curl https://raw.github.com/moliware/travis-solr/master/travis-solr.sh | SOLR_CONFS="tests/schema.xml tests/solrconfig.xml" SOLR_VERSION=4.4.0 bash

install:
- pip install tox
- pip install -e .

script:
- tox -e $TOX_ENV

env:
- TOX_ENV=py26-django1.5
- TOX_ENV=py26-django1.6
- TOX_ENV=py27-django1.5
- TOX_ENV=py27-django1.6
- TOX_ENV=py33-django1.5
- TOX_ENV=py33-django1.6

services:
- elasticsearch

notifications:
#irc: "irc.freenode.org#haystack"
email: false
21 changes: 20 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@ Primary Authors:
* Matt Croydon (some documentation, sanity checks and the sweet name)
* Travis Cline (the original SQ implementation, improvements to ModelSearchIndex)
* David Sauve (notanumber) for the Xapian backend, the simple backend and various patches.
* Jannis Leidel
* Jannis Leidel (jezdez)
* Chris Adams (acdha)
* Justin Caratzas (bigjust)
* Andrew Schoen (andrewschoen)
* Dan Watson (dcwatson)
* Matt Woodward (mpwoodward)
* Alex Vidal (avidal)
* Zach Smith (zmsmith)
* Stefan Wehrmeyer (stefanw)
* George Hickman (ghickman)
* Ben Spaulding (benspaulding)


Thanks to
Expand Down Expand Up @@ -71,3 +81,12 @@ Thanks to
* Stefan Wehrmeyer (stefanw) for a simple search filter fix
* Dan Watson (dcwatson) for various patches.
* Andrew Schoen (andrewschoen) for the addition of ``HAYSTACK_IDENTIFIER_METHOD``
* Pablo SEMINARIO (pabluk) for a docs fix, and a fix in the ElasticSearch backend.
* Eric Thurgood (ethurgood) for a import fix in the Elasticssearch backend.
* Revolution Systems & The Python Software Foundation for funding a significant portion of the port to Python 3!
* Artem Kostiuk (postatum) for patch allowing to search for slash character in ElasticSearch since Lucene 4.0.
* Luis Barrueco (luisbarrueco) for a simple fix regarding updating indexes using multiple backends.
* Szymon Teżewski (jasisz) for an update to the bounding-box calculation for spatial queries
* Chris Wilson (qris) and Orlando Fiol (overflow) for an update allowing the use of multiple order_by()
fields with Whoosh as long as they share a consistent sort direction
* Steven Skoczen (@skoczen) for an ElasticSearch bug fix
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2009-2012, Daniel Lindsley.
Copyright (c) 2009-2013, Daniel Lindsley.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
7 changes: 4 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Haystack
========

:author: Daniel Lindsley
:date: 2013/04/28
:date: 2013/07/28

Haystack provides modular search for Django. It features a unified, familiar
API that allows you to plug in different search backends (such as Solr_,
Expand Down Expand Up @@ -33,6 +33,7 @@ Documentation
=============

* Development version: http://docs.haystacksearch.org/
* v2.1.X: http://django-haystack.readthedocs.org/en/v2.1.0/
* v2.0.X: http://django-haystack.readthedocs.org/en/v2.0.0/
* v1.2.X: http://django-haystack.readthedocs.org/en/v1.2.7/
* v1.1.X: http://django-haystack.readthedocs.org/en/v1.1/
Expand All @@ -43,8 +44,8 @@ Requirements

Haystack has a relatively easily-met set of requirements.

* Python 2.5+
* Django 1.3+
* Python 2.6+ or Python 3.3+
* Django 1.5+

Additionally, each backend has its own requirements. You should refer to
http://docs.haystacksearch.org/dev/installing_search_engines.html for more
Expand Down
14 changes: 7 additions & 7 deletions docs/autocomplete.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ a small window passed over the string). Because this alters the way your
data needs to be stored, the best approach is to add a new field to your
``SearchIndex`` that contains the text you want to autocomplete on.

You have two choices: ``NgramField`` & ``EdgeNgramField``. Though very similar,
You have two choices: ``NgramField`` and ``EdgeNgramField``. Though very similar,
the choice of field is somewhat important.

* If you're working with standard text, ``EdgeNgramField`` tokenizes on
Expand Down Expand Up @@ -54,14 +54,14 @@ Step 2. Performing The Query
============================

Haystack ships with a convenience method to perform most autocomplete searches.
You simply provide a field & the query you wish to search on to the
You simply provide a field and the query you wish to search on to the
``SearchQuerySet.autocomplete`` method. Given the previous example, an example
search would look like::

from haystack.query import SearchQuerySet

SearchQuerySet().autocomplete(content_auto='old')
# Result match things like 'goldfish', 'cuckold' & 'older'.
# Result match things like 'goldfish', 'cuckold' and 'older'.

The results from the ``SearchQuerySet.autocomplete`` method are full search
results, just like any regular filter.
Expand All @@ -82,14 +82,14 @@ Example Implementation

The above is the low-level backend portion of how you implement autocomplete.
To make it work in browser, you need both a view to run the autocomplete
& some Javascript to fetch the results.
and some Javascript to fetch the results.

Since it comes up often, here is an example implementation of those things.

.. warning::

This code comes with no warranty. Don't ask for support on it. If you
copy-paste it & it burns down your server room, I'm not liable for any
copy-paste it and it burns down your server room, I'm not liable for any
of it.

It worked this one time on my machine in a simulated environment.
Expand All @@ -105,7 +105,7 @@ A stripped-down view might look like::


def autocomplete(request):
sqs = SearchQuerySet().autocomplete(request.GET.get('q', ''))[:5]
sqs = SearchQuerySet().autocomplete(content_auto=request.GET.get('q', ''))[:5]
suggestions = [result.title for result in sqs]
# Make sure you return a JSON object, not a bare list.
# Otherwise, you could be vulnerable to an XSS attack.
Expand Down Expand Up @@ -133,7 +133,7 @@ The template might look like::
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
// In a perfect world, this would be its own library file that got included
// on the page & only the ``$(document).ready(...)`` below would be present.
// on the page and only the ``$(document).ready(...)`` below would be present.
// But this is an example.
var Autocomplete = function(options) {
this.form_selector = options.form_selector
Expand Down
7 changes: 4 additions & 3 deletions docs/backend_support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Elasticsearch
* Stored (non-indexed) fields
* Highlighting
* Spatial search
* Requires: pyelasticsearch 0.4+ & Elasticsearch 0.17.7+
* Requires: elasticsearch-py 0.4.3+ & Elasticsearch 0.17.7+

Whoosh
------
Expand All @@ -59,10 +59,11 @@ Whoosh

* Full SearchQuerySet support
* Automatic query building
* "More Like This" functionality
* Term Boosting
* Stored (non-indexed) fields
* Highlighting
* Requires: whoosh (1.1.1+)
* Requires: whoosh (2.0.0+)

Xapian
------
Expand All @@ -89,7 +90,7 @@ Backend Support Matrix
+----------------+------------------------+---------------------+----------------+------------+----------+---------------+--------------+---------+
| Elasticsearch | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
+----------------+------------------------+---------------------+----------------+------------+----------+---------------+--------------+---------+
| Whoosh | Yes | Yes | No | Yes | No | Yes | Yes | No |
| Whoosh | Yes | Yes | Yes | Yes | No | Yes | Yes | No |
+----------------+------------------------+---------------------+----------------+------------+----------+---------------+--------------+---------+
| Xapian | Yes | Yes | Yes | Yes | Yes | Yes | Yes (plugin) | No |
+----------------+------------------------+---------------------+----------------+------------+----------+---------------+--------------+---------+
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@

# General information about the project.
project = u'Haystack'
copyright = u'2009-2012, Daniel Lindsley'
copyright = u'2009-2013, Daniel Lindsley'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '2.0.1'
version = '2.1.1'
# The full version, including alpha/beta/rc tags.
release = '2.0.1-dev'
release = '2.1.1-dev'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
21 changes: 3 additions & 18 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ you up and running:
debugging

migration_from_1_to_2
python3
contributing


Expand Down Expand Up @@ -109,24 +110,8 @@ Requirements

Haystack has a relatively easily-met set of requirements.

* Python 2.5+
* Django 1.3+
* Python 2.6+ or Python 3.3+
* Django 1.5+

Additionally, each backend has its own requirements. You should refer to
:doc:`installing_search_engines` for more details.


Commercial Support
==================

If you're using Haystack in a commercial environment, paid support is available
from `Toast Driven`_. Services offered include:

* Advice/help with setup
* Implementation in your project
* Bugfixes in Haystack itself
* Features in Haystack itself

If you're interested, please contact Daniel Lindsley (daniel@toastdriven.com).

.. _`Toast Driven`: http://toastdriven.com/
22 changes: 14 additions & 8 deletions docs/installing_search_engines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ than the JRE and Jetty. It's very performant and has an advanced featureset.
Haystack suggests using Solr 3.5+, though it's possible to get it working on
Solr 1.4 with a little effort. Installation is relatively simple::

curl -O http://apache.mirrors.tds.net/lucene/solr/3.5.0/apache-solr-3.5.0.tgz
curl -O https://archive.apache.org/dist/lucene/solr/3.5.0/apache-solr-3.5.0.tgz
tar xvzf apache-solr-3.5.0.tgz
cd apache-solr-3.5.0
cd example
Expand Down Expand Up @@ -152,17 +152,23 @@ locally. Modifications should be done in a YAML file, the stock one being
logs: /usr/local/var/log
data: /usr/local/var/data

You'll also need an Elasticsearch binding: pyelasticsearch_ (**NOT**
``pyes``). Place ``pyelasticsearch`` somewhere on your ``PYTHONPATH``
(usually ``python setup.py install`` or ``pip install pyelasticsearch``).
You'll also need an Elasticsearch binding: elasticsearch-py_ (**NOT**
``pyes``). Place ``elasticsearch`` somewhere on your ``PYTHONPATH``
(usually ``python setup.py install`` or ``pip install elasticsearch``).

.. _pyelasticsearch: http://pypi.python.org/pypi/pyelasticsearch/
.. _elasticsearch-py: http://pypi.python.org/pypi/elasticsearch/

.. note::

Elasticsearch 1.0 is slightly backwards incompatible so you need to make sure
you have the proper version of `elasticsearch-py` installed - releases with
major version 1 (1.X.Y) are to be used with Elasticsearch 1.0 and later, 0.4
releases are meant to work with Elasticsearch 0.90.X.

``pyelasticsearch`` has its own dependencies that aren't covered by
Haystack. You'll also need ``requests`` & ``simplejson`` for speedier
JSON construction/parsing.
.. note::

``elasticsearch`` has its own dependencies that aren't covered by
Haystack. You'll also need ``urllib3``.


Whoosh
Expand Down
8 changes: 8 additions & 0 deletions docs/other_apps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ Also provides a queue-based setup, this time centered around Celery. Useful
for keeping the index fresh per model instance or with the included task
to call the ``update_index`` management command instead.

haystack-rqueue
---------------

https://github.com/mandx/haystack-rqueue (2.X compatible)

Also provides a queue-based setup, this time centered around RQ. Useful
for keeping the index fresh using ``./manage.py rqworker``.

django-celery-haystack
----------------------

Expand Down
59 changes: 59 additions & 0 deletions docs/python3.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.. _ref-python3:

================
Python 3 Support
================

As of Haystack v2.1.0, it has been ported to support both Python 2 & Python 3
within the same codebase. This builds on top of what `six`_ & `Django`_ provide.

No changes are required for anyone running an existing Haystack
installation. The API is completely backward-compatible, so you should be able
to run your existing software without modification.

Virtually all tests pass under both Python 2 & 3, with a small number of
expected failures under Python (typically related to ordering, see below).

.. _`six`: http://pythonhosted.org/six/
.. _`Django`: https://docs.djangoproject.com/en/1.5/topics/python3/#str-and-unicode-methods


Supported Backends
==================

The following backends are fully supported under Python 3. However, you may
need to update these dependencies if you have a pre-existing setup.

* Solr (pysolr>=3.1.0)
* Elasticsearch


Partially Supported Backends
============================

Most aspects of Whoosh work fine under Python 3. However, the built-in
highlighting fails under Python 3.3.2. Using the Haystack-provided template tag
highlighting is a good stopgap until
https://bitbucket.org/mchaput/whoosh/324/highlighting-under-python-3-fails is
resolved.

* Whoosh (whoosh>=2.5.0)


Notes
=====

Testing
-------

If you were testing things such as the query generated by a given
``SearchQuerySet`` or how your forms would render, under Python 3.3.2+,
`hash randomization`_ is in effect, which means that the ordering of
dictionaries is no longer consistent, even on the same platform.

Haystack took the approach of abandoning making assertions about the entire
structure. Instead, we either simply assert that the new object contains the
right things or make a call to ``sorted(...)`` around it to ensure order. It is
recommended you take a similar approach.

.. _`hash randomization`: http://docs.python.org/3/whatsnew/3.3.html#builtin-functions-and-types
12 changes: 4 additions & 8 deletions docs/running_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ Configuring Solr
----------------

Haystack assumes that you have a Solr server running on port ``9001`` which uses the schema and
configuration provided in the ``tests/`` directory. Currently, these steps will result in a working
test server:

#. Download the current Solr release from http://lucene.apache.org/solr/
#. Copy ``tests/solrconfig.xml`` to ``example/solr/conf/solrconfig.xml``
#. Copy ``tests/solr_test_schema.xml`` to ``example/solr/conf/schema.xml``
#. Change into the ``example`` directory
#. Start Solr: ``java -Djetty.port=9001 -jar start.jar``
configuration provided in the ``tests/`` directory. For convenience, a script is provided which
will download, configure and start a test Solr server::

tests/start-solr-test-server.sh
Loading