diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d8c32ae5b..606656aca 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -57,6 +57,7 @@ Changelog * Fix: Restored ability to use non-model fields with FieldPanel (Matt Westcott, LB (Ben Johnston)) * Fix: Stop revision comparison view from crashing when non-model FieldPanels are in use (LB (Ben Johnston)) * Fix: Ordering in the page explorer now respects custom `get_admin_display_title` methods when sorting <100 pages (Matt Westcott) + * Fix: Use index-specific Elasticsearch endpoints for bulk insertion, for compatibility with providers that lock down the root endpoint (Karl Hobley) 2.0.2 (xx.xx.xxxx) - IN DEVELOPMENT diff --git a/docs/releases/2.1.rst b/docs/releases/2.1.rst index 467902333..87a962701 100644 --- a/docs/releases/2.1.rst +++ b/docs/releases/2.1.rst @@ -86,6 +86,7 @@ Bug fixes * Restored ability to use non-model fields with FieldPanel (Matt Westcott, LB (Ben Johnston)) * Stop revision comparison view from crashing when non-model FieldPanels are in use (LB (Ben Johnston)) * Ordering in the page explorer now respects custom ``get_admin_display_title`` methods when sorting <100 pages (Matt Westcott) + * Use index-specific Elasticsearch endpoints for bulk insertion, for compatibility with providers that lock down the root endpoint (Karl Hobley) Upgrade considerations diff --git a/wagtail/search/backends/elasticsearch2.py b/wagtail/search/backends/elasticsearch2.py index 3f7cddc3c..1f5e911c0 100644 --- a/wagtail/search/backends/elasticsearch2.py +++ b/wagtail/search/backends/elasticsearch2.py @@ -806,7 +806,6 @@ class Elasticsearch2Index: for item in items: # Create the action action = { - '_index': self.name, '_type': doc_type, '_id': mapping.get_document_id(item), } @@ -814,7 +813,7 @@ class Elasticsearch2Index: actions.append(action) # Run the actions - bulk(self.es, actions) + bulk(self.es, actions, index=self.name) def delete_item(self, item): # Make sure the object can be indexed