<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:00 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-495] The &quot;In&quot; operator matches the whole element in the input array. So a query with &quot;In&quot; with &quot;Contains&quot; is not possible.</title>
                <link>https://jira.mongodb.org/browse/CSHARP-495</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Please refer my question: ``Is there an option to perform the &quot;In&quot; operation on strings?`` for more details:&lt;br/&gt;
&lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-494&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/CSHARP-494&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is no equivalent to this mongo query in c# driver to linq:&lt;br/&gt;
db.Feeds.find({ShortDescription:{$in:&lt;span class=&quot;error&quot;&gt;&amp;#91;/sunil/, /raj/&amp;#93;&lt;/span&gt;}})&lt;/p&gt;

&lt;p&gt;The Predicatebuilder wraps the string content with double quotes, which affects the result. Please fix/ add this feature.&lt;/p&gt;

&lt;p&gt;Thanks..&lt;/p&gt;
</description>
                <environment>software platform</environment>
        <key id="41243">CSHARP-495</key>
            <summary>The &quot;In&quot; operator matches the whole element in the input array. So a query with &quot;In&quot; with &quot;Contains&quot; is not possible.</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="sunilrajkg">Sunil Raj</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Jun 2012 11:52:32 +0000</created>
                <updated>Mon, 4 May 2020 17:12:09 +0000</updated>
                            <resolved>Mon, 4 May 2020 17:12:09 +0000</resolved>
                                    <version>1.4.2</version>
                                                    <component>Feature Request</component>
                                        <votes>1</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="133241" author="sunilrajkg" created="Fri, 15 Jun 2012 12:26:38 +0000"  >&lt;p&gt;Thanks Craig for your input. I will implement the same and will be waiting too &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="133232" author="craiggwilson" created="Fri, 15 Jun 2012 12:16:02 +0000"  >&lt;p&gt;You can always build the $in query manually as well while you are waiting.  Syntax might be a little off here, but this should work.  $in will use an index better than $or.&lt;/p&gt;

&lt;p&gt;new QueryDocument(&quot;fieldName&quot;, new BsonDocument&lt;br/&gt;
{&lt;/p&gt;
  { &quot;$in&quot;, new BsonArray(searchwordlist.Select(x =&amp;gt; new Regex(x, RegexOptions.IgnoreCase)) }
&lt;p&gt;});&lt;/p&gt;</comment>
                            <comment id="133203" author="sunilrajkg" created="Fri, 15 Jun 2012 10:46:07 +0000"  >&lt;p&gt;Craig,&lt;br/&gt;
I was able to find an alternative to attain my objective.&lt;br/&gt;
I used the Query.Or().Inject() with a IMongoQuery with BSonValue as a Regular expression type.&lt;br/&gt;
My code block is given below:&lt;/p&gt;

&lt;p&gt;if (!string.IsNullOrEmpty(tags))&lt;br/&gt;
                    {&lt;br/&gt;
                        var searchwordlist = tags.ToLower().Split(new char[] &lt;/p&gt;
{ &apos;,&apos; }
&lt;p&gt;, StringSplitOptions.RemoveEmptyEntries).ToList();&lt;/p&gt;

&lt;p&gt;                        List&amp;lt;IMongoQuery&amp;gt; queries = new List&amp;lt;IMongoQuery&amp;gt;();&lt;br/&gt;
                        foreach (var item in searchwordlist)&lt;/p&gt;
                        {
                            queries.Add(new QueryDocument(new BsonElement(&quot;ShortDescription&quot;, new Regex(item, RegexOptions.IgnoreCase))));
                        }
&lt;p&gt;                        var queriesArray = queries.ToArray();&lt;br/&gt;
                        feeds = feeds.Where(f =&amp;gt; Query.Or(queriesArray).Inject());&lt;br/&gt;
                    }&lt;/p&gt;

&lt;p&gt;//Here I am creating an array of IMongoQuery by iterating through the list of strings to be passed as query.&lt;/p&gt;

&lt;p&gt;This seems to be performing a bit slow though. So waiting for your update on the new feature.&lt;/p&gt;</comment>
                            <comment id="132647" author="craiggwilson" created="Thu, 14 Jun 2012 15:16:25 +0000"  >&lt;p&gt;I&apos;m not sure I following your question: &quot;I was wondering if this was possible using other options such as regular expressions&quot;.  Could you please restate or clarify?&lt;/p&gt;</comment>
                            <comment id="132548" author="sunilrajkg" created="Thu, 14 Jun 2012 12:35:53 +0000"  >&lt;p&gt;I was wondering if this was possible using other options such as regular expressions. Anyways, thanks for the update. Eagerly waiting for the feature.&lt;br/&gt;
Sunil.&lt;/p&gt;</comment>
                            <comment id="132543" author="craiggwilson" created="Thu, 14 Jun 2012 12:23:06 +0000"  >&lt;p&gt;I have changed this from a Bug to a Feature Request as the code is performing properly, we just haven&apos;t implemented this particular item.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="41240">CSHARP-494</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="41168">CSHARP-493</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|hs0t9b:</customfieldvalue>

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