Wykres commitów

37 Commity (a5b544631bbde21b28ff749dcd53d35e5f5bf64d)

Autor SHA1 Wiadomość Data
Matt Westcott 59e9a31bc1 Document the fact that a matching version of the elasticsearch package must be used 2016-11-04 11:14:12 +00:00
Karl Hobley 9a57e39cfd Implemented annotate_score on SearchResults
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)
2016-09-22 12:03:23 +01:00
Mikalai Radchuk 5598910a2b Release notes for #2573 2016-08-31 14:13:47 +03:00
Karl Hobley daa82936d7 Elasticsearch 2 support (#2573)
* 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
2016-08-31 13:46:57 +03:00
Karl Hobley e29f9b2423 No longer say that ATOMIC_REBUILD is "Experimental"
We've used this in production on a few sites for over a year now and haven't hit any problems.
2016-08-31 09:54:35 +01:00
Josh Schneier 6d1a9efbb6 Update documentation and code to put mixin first 2016-05-04 14:05:33 +01:00
Tim Heap 6bd168580e Change Indexed.search_fields to be a listish thing
Indexed.search_fields used to be a tuple. This is incorrect, and it
should have been a list.  Changing it to be a list now would be a
backwards incompatible change, as people do

    search_fields = Page.search_fields + (
        SearchField('body')
    )

Adding a tuple to the end of a list causes an error, so this would
cause all old code that used tuples to throw an error. This is not
great.

A new ThisShouldBeAList class, which subclasses list, has been added.
It additionally allows tuples to be added to it, as in the above
behaviour, but will raise a deprecation warning if someone does this.
Old code that uses tuples will continue to work, but raise a deprecation
warning.

See #2310
2016-03-24 21:05:09 +00:00
Robert Rollins b94ff6a952 Searchly no longer supports Elasticsearch 1.x, so I switched the suggested development service to Bonsai. 2016-03-10 15:11:42 +00:00
Robert Rollins 6446c42132 Various typo fixes and grammar/clarity improvements. 2016-03-10 15:11:41 +00:00
Matt Westcott 04fdd5f352 Remove Django 1.7 support from documentation, requirements and CI definitions 2016-01-05 17:38:29 +00:00
Matt Westcott 2c765a7462 Release note for #1491 2015-12-11 12:46:01 +00:00
Karl Hobley eed5c60d72 Docs for index.RelatedFields 2015-12-11 12:29:27 +00:00
Karl Hobley 059fc15b9d Added note about Elasticsearch 2.x 2015-11-20 12:50:31 +00:00
Matt Westcott c2a183f19f Documentation tweaks as per https://github.com/torchbox/wagtail/pull/1815#commitcomment-13736415 https://github.com/torchbox/wagtail/pull/1815#commitcomment-13736421 2015-10-13 15:17:47 +01:00
Karl Hobley b278a0c0f8 Docs for custom ordering 2015-10-13 10:06:58 +01:00
Matt Westcott 06e721bc74 document the 'operator' kwarg on QuerySet.search 2015-10-12 22:04:29 +01:00
Karl Hobley 4dbf166e06 Merged duplicate documentation 2015-10-12 12:20:45 +01:00
Karl Hobley 83f8332288 Added docs for search operators 2015-10-12 12:15:57 +01:00
Karl Hobley fb09d89ec6 Search docs improvements 2015-10-12 12:15:33 +01:00
Matt Westcott 94d0d7bda2 Release / upgrade consideration note for #1478 2015-10-07 20:02:25 +01:00
Matt Westcott 94b5975afa Document the new image/document queryset search method 2015-10-07 20:02:19 +01:00
Tim Heap bc6b5a8a6c Normalise all code blocks in the docs
All `.. code::` instances have been changed to use `.. code-block::`,
and have been properly formatted. The syntax names have been normalised,
so all django templates use the `html+django` syntax, shell commands use
`sh`, and plain text uses `text`.
2015-10-05 16:55:58 +01:00
Matt Westcott bd59ee93b6 Release note for #1490 2015-08-01 11:13:46 +02:00
Matt Westcott 55c3606b16 Merge branch 'es-index-atomic-rebuild' of https://github.com/kaedroho/wagtail into kaedroho-es-index-atomic-rebuild 2015-08-01 10:52:20 +02:00
Karl Hobley 459a8c8b44 Renamed searchpicks app to searchpromotions 2015-07-21 13:37:42 +01:00
Karl Hobley 669c7ac34c Docs for searchpicks module 2015-07-21 13:37:42 +01:00
Karl Hobley a2f3c79b98 Docs for atomic rebuild 2015-07-08 15:59:14 +01:00
Karl Hobley 60e2d81052 Use search backend module imports in the docs 2015-07-01 14:36:50 +01:00
Matt Westcott 9bbbe53223 update docs for #1255 2015-06-26 16:34:00 +01:00
Karl Hobley eec194f154 Added missing "versionadded" 2015-06-01 09:54:17 +01:00
Karl Hobley 3188fc031a Added a link to AUTO_UPDATE docs from release notes 2015-05-29 17:00:09 +01:00
Matt Westcott eaa100367f Merge branch 'search-auto-update' of https://github.com/kaedroho/wagtail into kaedroho-search-auto-update 2015-05-29 15:58:29 +01:00
Karl Hobley c670f1a8e7 Indexing {non-page => custom} models 2015-05-29 11:23:31 +01:00
Karl Hobley e4ee711043 Removed Pagination from the example search view
Makes the searching bit easier to see. Leave pagination as an exercise for the reader
2015-05-29 11:20:05 +01:00
Karl Hobley e7c61b13b1 Improve docs for WAGTAILSEARCH_BACKENDS setting
Including docs for new AUTO_UPDATE parameter
2015-05-29 11:04:54 +01:00
Karl Hobley 640383ad29 Updates to search backends docs 2015-05-29 10:49:16 +01:00
Karl Hobley 2e0dcc88d5 Moved some of the reference docs into topics 2015-05-28 12:57:00 +01:00