- Bump version to 2.4.0.dev1. [Chris Adams]
- Travis: remove Django 1.8 from allow_failures. [Chris Adams]
- Tests: update test object creation for Django 1.8. [Chris Adams]
Several of the field tests previously assigned a related test model
instance before saving it::
mock_tag = MockTag(name='primary')
mock = MockModel()
mock.tag = mock_tag
Django 1.8 now validates this dodgy practice and throws an error.
This commit simply changes it to use `create()` so the mock_tag will
have a pk before assignment.
- Update AUTHORS. [Chris Adams]
- Tests: fix deprecated Manager.get_query_set call. [Chris Adams]
- Updating haystack to test against django 1.8. [Chris Adams]
Updated version of troygrosfield's patch updating the test-runner for
Django 1.8
Closes 1175
- Travis: allow Django 1.8 failures until officially supported. [Chris
Adams]
See 1175
- Remove support for Django 1.5, add 1.8 to tox/travis. [Chris Adams]
The Django project does not support 1.5 any more and it's the source of
most of our false-positive test failures
- Use db.close_old_connections instead of close_connection. [Chris
Adams]
Django 1.8 removed the `db.close_connection` method.
Thanks to Alfredo Armanini (phingage) for the patch
- Fix mistake in calling super TestCase method. [Ben Spaulding]
Oddly this caused no issue on Django <= 1.7, but it causes numerous
errors on Django 1.8.
- Correct unittest imports from commit e37c1f3. [Ben Spaulding]
- Prefer stdlib unittest over Django's unittest2. [Ben Spaulding]
There is no need to fallback to importing unittest2 because Django 1.5
is the oldest Django we support, so django.utils.unittest is guaranteed
to exist.
- Prefer stdlib OrderedDict over Django's SortedDict. [Ben Spaulding]
The two are not exactly they same, but they are equivalent for
Haystack's needs.
- Prefer stdlib importlib over Django's included version. [Ben
Spaulding]
The app_loading module had to shuffle things a bit. When it was
importing the function it raised a [RuntimeError][]. Simply importing
the module resolved that.
[RuntimeError]: https://gist.github.com/benspaulding/f36eaf483573f8e5f777
- Docs: explain how field boosting interacts with filter. [Chris Adams]
Thanks to amjoconn for contributing a doc update to help newcomers
Closes 1043
- Add tests for values/values_list slicing. [Chris Adams]
This confirms that 1019 is fixed
- Update_index: avoid gaps in removal logic. [Chris Adams]
The original logic did not account for the way removing records
interfered with the pagination logic.
Closes 1194
- Update_index: don't use workers to remove stale records. [Chris Adams]
There was only minimal gain to this because, unlike indexing, removal is
a simple bulk operation limited by the search engine.
See 1194
See 1201
- Remove lxml dependency. [Chris Adams]
pysolr 3.3.2+ no longer requires lxml, which saves a significant install
dependency
- Allow individual records to be skipped while indexing. [Chris Adams]
Previously there was no easy way to skip specific objects other than
filtering the queryset. This change allows a prepare method to raise
`SkipDocument` after calling methods or making other checks which cannot
easily be expressed as database filters.
Thanks to Felipe Prenholato (chronossc) for the patch
Closes 380
Closes 1191
- Update_index: avoid "MySQL has gone away error" with workers. [Eric
Bressler (Platform)]
This fixes an issue with a stale database connection being passed to
a multiprocessing worker when using `--remove`
Thanks to ebressler for the patch
Closes 1201
- Depend on pysolr 3.3.1. [Chris Adams]
- Start-solr-test-server: avoid Travis dependency. [Chris Adams]
This will now fall back to the current directory when run outside of our Travis-CI environment
- Fix update_index --remove handling. [Chris Adams]
* Fix support for custom keys by reusing the stored value rather than
regenerating following the default pattern
* Batch remove operations using the total number of records
in the search index rather than the database
Closes 1185
Closes 1186
Closes 1187
- Merge pull request 1177 from paulshannon/patch-1. [Chris Adams]
Update TravisCI link in README
- Update TravisCI link. [Paul Shannon]
I think the repo got changed at some point and the old project referenced at travisci doesn't exist anymore...
- Travis: enable containers. [Chris Adams]
* Move apt-get installs to the addons/apt_packages:
http://docs.travis-ci.com/user/apt-packages/
* Set `sudo: false` to enable containers:
http://docs.travis-ci.com/user/workers/container-based-infrastructure/
- Docs: correct stray GeoDjango doc link. [Chris Adams]
- Document: remove obsolete Whoosh Python 3 warning. [Chris Adams]
Thanks to gitaarik for the pull request
Closes 1154
Fixes 1108
- Remove method_decorator backport (closes 1155) [Chris Adams]
This was no longer used anywhere in the Haystack source or documentation
- Travis: enable APT caching. [Chris Adams]
- Travis: update download caching. [Chris Adams]
- App_loading cleanup. [Chris Adams]
* Add support for Django 1.7+ AppConfig
* Rename internal app_loading functions to have haystack_ prefix to make
it immediately obvious that they are not Django utilities and start
* Add tests to avoid regressions for apps nested with multiple levels of
module hierarchy like `raven.contrib.django.raven_compat`
* Refactor app_loading logic to make it easier to remove the legacy
compatibility code when we eventually drop support for older versions
of Django
Fixes 1125
Fixes 1150
Fixes 1152
Closes 1153
- Switch defaults closer to Python 3 defaults. [Chris Adams]
* Add __future__ imports:
isort --add_import 'from __future__ import absolute_import, division, print_function, unicode_literals'
* Add source encoding declaration header
- Setup.py: use strict PEP-440 dev version. [Chris Adams]
The previous version was valid as per PEP-440 but triggers a warning in
pkg_resources
- Merge pull request 1146 from kamilmowinski/patch-1. [Chris Adams]
Fix typo in SearchResult documentation
- Update searchresult_api.rst. [kamilmowinski]
- Merge pull request 1143 from wicol/master. [Chris Adams]
Fix deprecation warnings in Django 1.6.X (thanks wicol)
- Fix deprecation warnings in Django 1.6.X. [Wictor]
Options.model_name was introduced in Django 1.6 together with a deprecation warning:
https://github.com/django/django/commit/ec469ade2b04b94bfeb59fb0fc7d9300470be615
- Travis: move tox setup to before_script. [Chris Adams]
This should cause dependency installation problems to show up as build
errors rather than outright failures
- Update ElasticSearch defaults to allow autocompleting numbers. [Chris
Adams]
Previously the defaults for ElasticSearch used the `lowercase`
tokenizer, which prevented numbers from being autocompleted.
Thanks to Phill Tornroth (phill-tornroth) for contributing a patch
which changes the default settings to use the `standard` tokenizer
with the `lowercase` filter
Closes 1056
- Update documentation for new class-based views. [Chris Adams]
Thanks to troygrosfield for the pull-request
Closes 1139
Closes 1133
See 1130
- Added documentation for configuring facet behaviour. [Chris Adams]
Thanks to Philippe Luickx for the contribution
Closes 1111
- UnifiedIndex has a stable interface to get all indexes. [Chris Adams]
Previously it was possible for UnifiedIndexes.indexes to be empty when
called before the list had been populated. This change deprecates
accessing `.indexes` directly in favor of a `get_indexes()` accessor
which will call `self.build()` first if necessary.
Thanks to Phill Tornroth for the patch and tests.
Closes 851
- Add support for SQ in SearchQuerySet.narrow() (closes 980) [Chris
Adams]
Thanks to Andrei Fokau (andreif) for the patch and tests
- Disable multiprocessing on Python 2.6 (see 1001) [Chris Adams]
multiprocessing.Pool.join() hangs reliably on Python 2.6 but
not any later version tested. Since this is an optional
feature we’ll simply disable it
- Bump version number to 2.4.0-dev. [Chris Adams]
- Update_index: wait for all pool workers to finish. [Chris Adams]
There was a race condition where update_index() would return
before all of the workers had finished updating Solr. This
manifested itself most frequently as Travis failures
for the multiprocessing test (see 1001).
- Tests: Fix ElasticSearch index setup (see 1093) [Chris Adams]
Previously when clear_elasticsearch_index() was called to
reset the tests, this could produce confusing results
because it cleared the mappings without resetting the
backend’s setup_complete status and thus fields which were
expected to have a specific type would end up being inferred
With this changed test_regression_proper_start_offsets and
test_more_like_this no longer fail
- Update rebuild_index --nocommit handling and add tests. [Chris Adams]
rebuild_index builds its option list by combining the options from
clear_index and update_index. This previously had a manual exclude list
for options which were present in both commands to avoid conflicts but
the nocommit option wasn't in that list.
This wasn't tested because our test suite uses call_command rather than
invoking the option parser directly.
This commit also adds tests to confirm that --nocommit will actually
pass commit=False to clear_index and update_index.
Closes 1140
See 1090
- Support ElasticSearch 1.x distance filter syntax (closes 1003) [Chris
Adams]
The elasticsearch 1.0 release was backwards incompatible
with our previous usage.
Thanks to dulaccc for the patch adding support.
- Docs: add Github style guide link to pull request instructions. [Chris
Adams]
The recent Github blog post makes a number of good points:
https://github.com/blog/1943-how-to-write-the-perfect-pull-request
- Fixed exception message when resolving model_attr. [Wictor]
This fixes the error message displayed when model_attr references an
unknown attribute.
Thanks to wicol for the patch
Closes 1094
- Compatibility with Django 1.7 app loader (see 1097) [Chris Adams]
* Added wrapper around get_model, so that Django 1.7 uses the new app
loading mechanism.
* Added extra model check to prevent that a simple module is treated as
model.
Thanks to Dirk Eschler (deschler) for the patch.
- Fix index_fieldname to match documentation (closes 825) [Chris Adams]
jarig contributed a fix to ensure that index_fieldname renaming does
not interfere with using the field name declared on the index.
- Add tests for Solr/ES spatial order_by. [Chris Adams]
This exists primarily to avoid the possibility of breaking
compatibility with the inconsistent lat, lon ordering used
by Django, Solr and ElasticSearch.
- Remove undocumented `order_by_distance` [Chris Adams]
This path was an undocumented artifact of the original
geospatial feature-branch back in the 1.X era. It wasn’t
documented and is completely covered by the documented API.
- ElasticSearch tests: PEP-8 cleanup. [Chris Adams]
- Implement managers tests for spatial features. [Chris Adams]
This is largely shadowed by the actual spatial tests but it
avoids surprises on the query generation
* Minor PEP-8
- Remove unreferenced add_spatial methods. [Chris Adams]
SolrSearchQuery and ElasticsearchSearchQuery both defined
an `add_spatial` method which was neither called nor
documented.
- Remove legacy httplib/httplib2 references. [Chris Adams]
We’ve actually delegated the actual work to requests but the
docs & tests had stale references
- Tests: remove legacy spatial backend code. [Chris Adams]
This has never run since the solr_native_distance backend
did not exist and thus the check always failed silently
- ElasticSearch backend: minor PEP-8 cleanup. [Chris Adams]
- Get-solr-download-url: fix Python 3 import path. [Chris Adams]
This allows the scripts to run on systems where Python 3 is
the default version
- Merge pull request 1130 from troygrosfield/master. [Chris Adams]
Added generic class based search views
(thanks troygrosfield)
- Removed "expectedFailure". [Troy Grosfield]
- Minor update. [Troy Grosfield]
- Added tests for the generic search view. [Troy Grosfield]
- Hopefully last fix for django version checking. [Troy Grosfield]
- Fix for django version check. [Troy Grosfield]
- Adding fix for previously test for django 1.7. [Troy Grosfield]
- Adding py34-django1.7 to travis. [Troy Grosfield]
- Test for the elasticsearch client. [Troy Grosfield]
- Added unicode_literals import for py 2/3 compat. [Troy Grosfield]
- Added generic class based search views. [Troy Grosfield]
- Merge pull request 1101 from iElectric/nothandledclass. [Chris Adams]
Report correct class when raising NotHandled
- Report correct class when raising NotHandled. [Domen Kožar]
- Merge pull request 1090 from andrewschoen/feature/no-commit-flag.
[Chris Adams]
Adds a --nocommit arg to the update_index, clear_index and rebuild_index management command.
- Adds a --nocommit arg to the update_index, clear_index and
rebuild_index management commands. [Andrew Schoen]
- Merge pull request 1103 from pkafei/master. [Chris Adams]
Update documentation to reference Solr 4.x
- Changed link to official archive site. [Portia Burton]
- Added path to schema.xml. [Portia Burton]
- Added latest version of Solr to documentation example. [Portia Burton]
- Update ElasticSearch version requirements. [Chris Adams]
- Elasticsearch's python api by default has _source set to False, this
causes keyerror mentioned in bug 1019. [xsamurai]
- Solr: clear() won’t call optimize when commit=False. [Chris Adams]
An optimize will trigger a commit implicitly so we’ll avoid
calling it when the user has requested not to commit
- Bumped __version__ (closes 1112) [Dan Watson]
- Travis: allow PyPy builds to fail. [Chris Adams]
This is currently unstable and it's not a first-class supported platform
yet
- Tests: fix Solr server tarball test. [Chris Adams]
On a clean Travis instance, the tarball won't exist
- Tests: have Solr test server startup script purge corrupt tarballs.
[Chris Adams]
This avoids tests failing if a partial download is cached by Travis
- Merge pull request 1084 from streeter/admin-mixin. [Daniel Lindsley]
Document and add an admin mixin
- Document support for searching in the Django admin. [Chris Streeter]
- Add some spacing. [Chris Streeter]
- Create an admin mixin for external use. [Chris Streeter]
There are cases where one might have a different base admin class, and
wants to use the search features in the admin as well. Creating a mixin
makes this a bit cleaner.