<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:54:01 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-1197] DBCollection.createIndex/ensureIndex deprecation notice is flipped from MongoDB Manual documentation</title>
                <link>https://jira.mongodb.org/browse/JAVA-1197</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;MongoDB Manual recommends ensureIndex :&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://docs.mongodb.org/manual//tutorial/create-an-index/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual//tutorial/create-an-index/&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://docs.mongodb.org/manual//reference/method/db.collection.ensureIndex/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual//reference/method/db.collection.ensureIndex/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and deprecates createIndex since very long ago:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://docs.mongodb.org/manual//reference/method/db.collection.createIndex/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual//reference/method/db.collection.createIndex/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;db.collection.createIndex(keys, options)&lt;br/&gt;
Deprecated since version 1.8.&lt;/p&gt;

&lt;p&gt;Creates indexes on collections.&lt;/p&gt;

&lt;p&gt;Java API is the other way around, recommends createIndex:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://api.mongodb.org/java/current/com/mongodb/DBCollection.html#createIndex(com.mongodb.DBObject&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://api.mongodb.org/java/current/com/mongodb/DBCollection.html#createIndex(com.mongodb.DBObject&lt;/a&gt;) :&lt;/p&gt;

&lt;p&gt;createIndex&lt;br/&gt;
public void createIndex(DBObject keys)&lt;br/&gt;
Calls createIndex(com.mongodb.DBObject, com.mongodb.DBObject) with default index options&lt;/p&gt;

&lt;p&gt;and deprecates ensureIndex :&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://api.mongodb.org/java/current/com/mongodb/DBCollection.html#ensureIndex(com.mongodb.DBObject&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://api.mongodb.org/java/current/com/mongodb/DBCollection.html#ensureIndex(com.mongodb.DBObject&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;ensureIndex&lt;br/&gt;
@Deprecated&lt;br/&gt;
public void ensureIndex(DBObject keys)&lt;br/&gt;
Deprecated. use createIndex(DBObject) instead&lt;br/&gt;
Calls ensureIndex(com.mongodb.DBObject, com.mongodb.DBObject) with default options&lt;/p&gt;</description>
                <environment></environment>
        <key id="134335">JAVA-1197</key>
            <summary>DBCollection.createIndex/ensureIndex deprecation notice is flipped from MongoDB Manual documentation</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="ceefour">Hendy Irawan</reporter>
                        <labels>
                    </labels>
                <created>Thu, 1 May 2014 08:12:52 +0000</created>
                <updated>Thu, 8 Oct 2015 15:34:55 +0000</updated>
                            <resolved>Thu, 8 Oct 2015 15:34:55 +0000</resolved>
                                    <version>2.12.1</version>
                                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1055442" author="jeff.yemin" created="Thu, 8 Oct 2015 15:34:55 +0000"  >&lt;p&gt;Now that the server has implemented a createIndexes command, the driver is going to prefer that name over ensureIndex.  I hope this clarifies the situation.&lt;/p&gt;

&lt;p&gt;So closing this as Works as Designed.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hryhvb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>115468</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>