<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:39:39 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>[CSHARP-1455] Checking for the existence of an index is very verbose</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1455</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;This is a request for a &apos;HasIndex(string indexName)&apos; or &apos;ContainsIndex(string indexName)&apos; helper.&lt;/p&gt;

&lt;p&gt;Unless I&apos;m missing something, to find out if an index exists on a collection, one must:&lt;/p&gt;

&lt;p&gt;var query = await myCollection.Indexes.ListAsync();&lt;br/&gt;
var bsonIndexes = await query.ToListAsync();&lt;br/&gt;
var indexNames = bsonIndexes .Select(i =&amp;gt; i.Values); // or some variation&lt;br/&gt;
return indexNames.Contains(&quot;blah&quot;);&lt;/p&gt;
</description>
                <environment></environment>
        <key id="235727">CSHARP-1455</key>
            <summary>Checking for the existence of an index is very verbose</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="nick@innsenroute.com">Nick Judson</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Oct 2015 18:23:59 +0000</created>
                <updated>Wed, 8 Feb 2023 14:11:16 +0000</updated>
                            <resolved>Thu, 3 Dec 2020 17:12:08 +0000</resolved>
                                    <version>2.0</version>
                    <version>2.1</version>
                                                    <component>API</component>
                                        <votes>1</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="3514615" author="jeff.yemin" created="Thu, 3 Dec 2020 17:12:08 +0000"  >&lt;p&gt;If anyone is still interested in this issue, we can re-open and re-consider.&lt;/p&gt;</comment>
                            <comment id="2161304" author="kevinbrok" created="Mon, 25 Feb 2019 12:45:37 +0000"  >&lt;p&gt;I created another issue similar to this since I found an usecase in which you want to retrieve the existsing Index.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-2529&quot; title=&quot;Get an Index by name&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-2529&quot;&gt;&lt;del&gt;CSHARP-2529&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1287100" author="donnyv@gmail.com" created="Tue, 7 Jun 2016 20:56:31 +0000"  >&lt;p&gt;I think the reason they got rid of IndexExists is because if you try to add an existing index it doesn&apos;t do anything. So you don&apos;t really need to check if its there anymore. Just add it and Mongo will take care of adding or ignoring the request.&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|hsdvtb:</customfieldvalue>

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