Skip to content

Commit

Permalink
Merge pull request #2573 from bagerard/improve_compound_indexes
Browse files Browse the repository at this point in the history
Improve compound indexes in rst
  • Loading branch information
bagerard committed Oct 13, 2021
2 parents dbd7228 + 4210ea0 commit 811dc12
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/guide/defining-documents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ dictionary containing a full index definition.

A direction may be specified on fields by prefixing the field name with a
**+** (for ascending) or a **-** sign (for descending). Note that direction
only matters on multi-field indexes. Text indexes may be specified by prefixing
only matters on compound indexes. Text indexes may be specified by prefixing
the field name with a **$**. Hashed indexes may be specified by prefixing
the field name with a **#**::

Expand All @@ -488,14 +488,14 @@ the field name with a **#**::
created = DateTimeField()
meta = {
'indexes': [
'title',
'title', # single-field index
'$title', # text index
'#title', # hashed index
('title', '-rating'),
('category', '_cls'),
('title', '-rating'), # compound index
('category', '_cls'), # compound index
{
'fields': ['created'],
'expireAfterSeconds': 3600
'expireAfterSeconds': 3600 # ttl index
}
]
}
Expand Down

0 comments on commit 811dc12

Please sign in to comment.