<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:58:18 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-2890] Collation not working for count()</title>
                <link>https://jira.mongodb.org/browse/JAVA-2890</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Tested In :&#160;&lt;/p&gt;

&lt;p&gt;Monogb Version : 3.4.13&#160;&lt;/p&gt;

&lt;p&gt;Spring Data Mongo DB - 2.0.3.RELEASE&lt;/p&gt;

&lt;p&gt;Collation is working fine when we use find() ,But doesn&apos;t&#160; seem to be working using count()&lt;/p&gt;

&lt;p&gt;db.test.count({headline:&apos;Developer&apos;}).collation({locale:&apos;en_US&apos;, strength:2});&lt;/p&gt;</description>
                <environment></environment>
        <key id="562371">JAVA-2890</key>
            <summary>Collation not working for count()</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="5">Cannot Reproduce</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="reddylokesh">Lokesh Reddy</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Jun 2018 06:09:15 +0000</created>
                <updated>Thu, 21 Jun 2018 11:39:14 +0000</updated>
                            <resolved>Thu, 21 Jun 2018 07:49:49 +0000</resolved>
                                    <version>3.4.3</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1927266" author="ross@10gen.com" created="Thu, 21 Jun 2018 11:39:14 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=reddylokesh&quot; class=&quot;user-hover&quot; rel=&quot;reddylokesh&quot;&gt;reddylokesh&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thats because in the shell `db.test.count()` returns a number, so you can&apos;t chain the collation like that. See &lt;a href=&quot;https://docs.mongodb.com/manual/reference/collation/#operations-that-support-collation&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;operations that support collation&lt;/a&gt; in the documentation. I believe you will need to change the form to use `db.collection.find(query, options).count()`.&lt;/p&gt;

&lt;p&gt;Just to let you know for future reference this project is for Java driver bugs or feature requests.  The best place for questions regarding MongoDB usage or the Java driver specifics is the &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb-user mailinglist&lt;/a&gt; or &lt;a href=&quot;http://stackoverflow.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;stackoverflow&lt;/a&gt; as you will reach a boarder audience there.  If your business requires an answer from MongoDB within a time frame then we do offer &lt;a href=&quot;https://www.mongodb.com/products/production-support&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;production support&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I hope that helps,&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="1927172" author="reddylokesh" created="Thu, 21 Jun 2018 08:44:01 +0000"  >&lt;p&gt;Hi Ross ,&lt;/p&gt;

&lt;p&gt;It is not working in mongo shell either .&lt;/p&gt;

&lt;p&gt;mongo shell is not related to spring data mongodb .&lt;/p&gt;

&lt;p&gt;db.test.count({headline:&apos;Developer&apos;}).collation({locale:&apos;en_US&apos;, strength:2});&lt;/p&gt;

&lt;p&gt;The above returns collation is not a function ..&lt;/p&gt;

&lt;p&gt;However this works&#160;db.test.find({headline:&apos;Developer&apos;}).collation({locale:&apos;en_US&apos;, strength:2}).count();&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="1927154" author="ross@10gen.com" created="Thu, 21 Jun 2018 07:49:38 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=reddylokesh&quot; class=&quot;user-hover&quot; rel=&quot;reddylokesh&quot;&gt;reddylokesh&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;I think this ticket has been misfiled and perhaps should be in the &lt;a href=&quot;https://jira.spring.io/projects/DATAMONGO&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Spring Data Jira project&lt;/a&gt;. The Java driver supports collations with count and has a test case here: &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/blob/r3.7.1/driver-core/src/test/functional/com/mongodb/operation/CountOperationSpecification.groovy#L351-L365&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CountOperationSpecification.groovy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If it hasn&apos;t been misfiled please comment and with further information and I&apos;ll investigate.&lt;/p&gt;

&lt;p&gt;Ross&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|htrxtz:</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>