<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:57:06 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-2401] Create an API for creating IndexOptions from Bson objects</title>
                <link>https://jira.mongodb.org/browse/JAVA-2401</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;As a user I want to have an API for easy creating IndexOptions from Bson objects.&lt;/p&gt;

&lt;p&gt;Given Bson object containing all the options I need - I have to individually map them into IndexOptions.&lt;/p&gt;</description>
                <environment></environment>
        <key id="336929">JAVA-2401</key>
            <summary>Create an API for creating IndexOptions from Bson objects</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="Wrekah">Tomasz Piskorski [X]</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Dec 2016 11:51:56 +0000</created>
                <updated>Tue, 28 Mar 2017 22:06:00 +0000</updated>
                            <resolved>Tue, 28 Mar 2017 22:06:00 +0000</resolved>
                                                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1486024" author="jeff.yemin" created="Thu, 26 Jan 2017 17:42:53 +0000"  >&lt;p&gt;I&apos;m inclined to close as Won&apos;t Fix, given that:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;There are numerous Options classes, and it wouldn&apos;t make sense to do this for just one.  We&apos;d have to do it for all.&lt;/li&gt;
	&lt;li&gt;There is not always a clean mapping between options classes and a single BSON Document&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Fundamentally, we don&apos;t expect a significant proportion of our users will have the requirement to configure options classes via BSON/JSON, and those that do can straightforwardly write their own code to map between the two.&lt;/p&gt;
</comment>
                            <comment id="1466127" author="jeff.yemin" created="Wed, 28 Dec 2016 21:21:30 +0000"  >&lt;p&gt;There is a org.bson.BsonArray#parse method, but that&apos;s not going to help you transform each BsonDocument in the BsonArray into an instance of IndexOptions.  You&apos;d still have to write that code manually.&lt;/p&gt;

&lt;p&gt;Another options is to use MongoDatabase.command() and construct the createIndexes command in your application.&lt;/p&gt;</comment>
                            <comment id="1464375" author="wrekah" created="Thu, 22 Dec 2016 21:22:18 +0000"  >&lt;p&gt;We store all indexes per collection in a single json file. So itrs an array of objects.&lt;br/&gt;
The format is:&lt;/p&gt;

&lt;p&gt;[&lt;br/&gt;
   &lt;/p&gt;
{
    keys:[...],
    options: [...]
   }
&lt;p&gt;, &lt;br/&gt;
...&lt;br/&gt;
]&lt;/p&gt;


&lt;p&gt;We wanted to move from mongo 2 to mongo 3 API.&lt;br/&gt;
In mongo 2 API there is, I could parse array of objects into DBObject list or something like that, the thing is we want to use the newer API.&lt;br/&gt;
In mongo 3 API theres no clean way of parsing this using built-in API.&lt;/p&gt;


&lt;p&gt;Document.parse parses only single JSON object, lacking the functionality of parsing the array of objects. We used third party library on top of that.&lt;/p&gt;</comment>
                            <comment id="1464021" author="jeff.yemin" created="Thu, 22 Dec 2016 15:10:24 +0000"  >&lt;p&gt;Where is your application getting the Bson object that contains all the options you need?  &lt;/p&gt;

&lt;p&gt;If the driver provided this, it would have to do it for all the options classes in com.mongodb.client.model, so we&apos;d really like to understand the use case for this request.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <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|hssmdb:</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>