Document sparse and expireAfterSeconds Mongo index options

https://bugs.php.net/bug.php?id=63183
https://jira.mongodb.org/browse/PHP-516


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@327869 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jeremy Mikola 2012-10-03 21:35:45 +00:00
parent 6582ab4d00
commit b397091f0d

View file

@ -60,9 +60,11 @@
</para>
<warning>
<para>
A unique index cannot be created on a field if multiple existing documents do
not contain the field. The field is effectively &null; for these documents
and thus already non-unique.
A unique index cannot be created on a field if multiple existing
documents do not contain the field. The field is effectively &null;
for these documents and thus already non-unique. Sparse indexing may
be used to overcome this, since it will prevent documents without the
field from being indexed.
</para>
</warning>
</listitem>
@ -75,6 +77,32 @@
all but one duplicate value.
</para>
</listitem>
<listitem>
<para>
<literal>"sparse"</literal>
</para>
<para>
Create a sparse index, which only includes documents containing the
field. This option is only compatible with single-field indexes.
</para>
</listitem>
<listitem>
<para>
<literal>"expireAfterSeconds"</literal>
</para>
<para>
The value of this option should specify the number of seconds after
which a document should be considered expired and automatically
removed from the collection. This option is only compatible with
single-field indexes where the field will contain
<classname>MongoDate</classname> values.
</para>
<para>
This feature is available in MongoDB 2.2+. See
<link xlink:href="&url.mongodb.docs.expire_data;">Expire Data from Collections by Setting TTL</link>
for more information.
</para>
</listitem>
<listitem>
<para>
<literal>"background"</literal>