* Adds PostgreSQL search backend.
* Isort nitpicks.
* Fixes PostgreSQL versions incompatibilities.
* Uses Django lru_cache instead of building our own.
* Fixes PostgreSQL search index on some empty vector & query cases.
* Never sets the PostgreSQL search vector to NULL.
* Simplification + removes caching on two fast enough functions.
* Rewrites stale entries deletion to use the ORM.
The idea is that Streamfield-Blocks can be grouped in the CMS
by setting Meta's `group` attribute.
This gives a better overview, particularly with many blocks.
If the attribute remains unset, nothing changes.
It is possible to set default format for date/datetime inputs. This works together
with standard django localization.
# django settings
USE_I18N = True
LANGUAGE_CODE = 'sl'
# wagtail settings
WAGTAIL_DATE_FORMAT = '%d.%m.%Y.'
WAGTAIL_DATETIME_FORMAT = '%d.%m.%Y. %H:%M'
DateBlock, DateTimeBlock accepts additional keyword argument `format`.
I came to this page from "Getting Started" template examples where all pages examples are rendered within {% block content %} tags which are not in these template examples."
;
Closes #2778
Extra ES params are now passed through new OPTIONS key in the
WAGTAILSEARCH_BACKENDS setting.
It's backward compatible: if no OPTIONS key is found and some parameters
still exist, those parameters are used for the ES constructor..
This is the correct lexer for interactive console sessions, according to
<http://pygments.org/docs/lexers/>. This does require command lines to
be prefixed with `$`, otherwise they are interpreted as the output of a
command. It highlights the command nicely, including environment
variables, strings, and comments.
This allows the user to retrieve the scores for each search result:
for page in Page.objects.search("Hello").annotate_score('_score'):
print(page.title, page._score)
* Created Elasticsearch 2 backend
* Added tests for Elasticsearch 2 backend
* Split models up into different indices
pages, images and documents are now in separate indices
* Prefix fields of child models to prevent mapping clashes
* Replaced index_analyzer with analyzer/search_analyzer
index_analyzer has been removed in Elasticsearch 2.0
https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_20_mapping_changes.html#_analyzer_mappings
There's no indication in Elasticsearch's docs that this wouldn't work on Elasticsearch 1.x. However, we found that the new configuration isn't reliable on Elasticsearch 1.6 and below (causes the test_query_analyzer test to fail randomly).
* Implemented new way of representing content types in search index
Instead of using a long string of model names that is queried using a
"prefix" query, we instead use a multi-value string field and query it
using a simple "match" query.
The only reason why this isn't implemented in the Elasticsearch 1.x
backend yet is backwards compatibility
* Added another child model of SearchTest with clashing field mapping
This checks that the namespacing of fields on child models is working properly (if it doesn't the update_index tests will fail)
* Added tests for get_model_root function
* fixup! Added tests for get_model_root function
* Docs updates for Elasticsearch 2 support
Also tweak examples to use elasticsearch2 backend by default
* Test against Elasticsearch 2 on travis