summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNick Pope <nick.pope@flightdataservices.com>2019-10-18 10:08:50 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-11-07 11:23:53 +0100
commit02983c5242ee71925a7a9ca15ea7cab49e81396b (patch)
tree37a1d6e4db0b32e88ccb792f525ad41ebba60ac0 /docs
parent26554cf5d1e96db10d0d5f4b69683a22fb82fdf8 (diff)
Fixed #30943 -- Added BloomIndex to django.contrib.postgres.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/postgres/indexes.txt23
-rw-r--r--docs/ref/contrib/postgres/operations.txt9
-rw-r--r--docs/releases/3.1.txt5
3 files changed, 36 insertions, 1 deletions
diff --git a/docs/ref/contrib/postgres/indexes.txt b/docs/ref/contrib/postgres/indexes.txt
index 3c5ff89c67..f9c0fb2f97 100644
--- a/docs/ref/contrib/postgres/indexes.txt
+++ b/docs/ref/contrib/postgres/indexes.txt
@@ -7,6 +7,29 @@ PostgreSQL specific model indexes
The following are PostgreSQL specific :doc:`indexes </ref/models/indexes>`
available from the ``django.contrib.postgres.indexes`` module.
+``BloomIndex``
+==============
+
+.. class:: BloomIndex(length=None, columns=(), **options)
+
+ .. versionadded:: 3.1
+
+ Creates a bloom_ index.
+
+ To use this index access you need to activate the bloom_ extension on
+ PostgreSQL. You can install it using the
+ :class:`~django.contrib.postgres.operations.BloomExtension` migration
+ operation.
+
+ Provide an integer number of bits from 1 to 4096 to the ``length``
+ parameter to specify the length of each index entry. PostgreSQL's default
+ is 80.
+
+ The ``columns`` argument takes a tuple or list of up to 32 values that are
+ integer number of bits from 1 to 4095.
+
+ .. _bloom: https://www.postgresql.org/docs/current/bloom.html
+
``BrinIndex``
=============
diff --git a/docs/ref/contrib/postgres/operations.txt b/docs/ref/contrib/postgres/operations.txt
index 1329ff1f9e..620e5db8b7 100644
--- a/docs/ref/contrib/postgres/operations.txt
+++ b/docs/ref/contrib/postgres/operations.txt
@@ -49,6 +49,15 @@ run the query ``CREATE EXTENSION IF NOT EXISTS hstore;``.
This is a required argument. The name of the extension to be installed.
+``BloomExtension``
+==================
+
+.. class:: BloomExtension()
+
+ .. versionadded:: 3.1
+
+ Install the ``bloom`` extension.
+
``BtreeGinExtension``
=====================
diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt
index d7c05e88df..a3b4f30d63 100644
--- a/docs/releases/3.1.txt
+++ b/docs/releases/3.1.txt
@@ -71,7 +71,10 @@ Minor features
:mod:`django.contrib.postgres`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* ...
+* The new :class:`~django.contrib.postgres.indexes.BloomIndex` class allows
+ creating ``bloom`` indexes in the database. The new
+ :class:`~django.contrib.postgres.operations.BloomExtension` migration
+ operation installs the ``bloom`` extension to add support for this index.
:mod:`django.contrib.redirects`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~