<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:16:42 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>[SERVER-27946] Logical AND operator in Text Search - would allow combination with logical OR</title>
                <link>https://jira.mongodb.org/browse/SERVER-27946</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I would like to combine logical OR and ANDs in a text search, for example:&lt;/p&gt;

&lt;p&gt;    &quot;gas&quot; AND (&quot;TTF&quot; OR &quot;Netherlands&quot; OR &quot;Rotterdam&quot;)&lt;/p&gt;

&lt;p&gt;In the documentation for $text there is no mention of an AND operator - stackoverflow answers suggest a workaround is to pass multiple phrases to the $search operator, eg.&lt;/p&gt;

&lt;p&gt;    db.Examples.find({$text: {$search: &quot;\&quot;gas\&quot; \&quot;TTF\&quot;&quot;}})&lt;/p&gt;

&lt;p&gt;However this stops you using OR operators. My current approach is to run two searches, one for &quot;gas&quot; and one for (&quot;TTF&quot; OR &quot;Netherlands&quot; OR &quot;Rotterdam&quot;), returning just the _id field, take the common ids from the two lists and then run a filter query with the result.&lt;/p&gt;

&lt;p&gt;Is there currently a way to combine ORs and ANDs? And if not would it be possible to add an AND operator?&lt;/p&gt;

&lt;p&gt;Thanks for your help,&lt;br/&gt;
Phil&lt;/p&gt;</description>
                <environment>Ubuntu Linux, MongoDB v3.2</environment>
        <key id="352590">SERVER-27946</key>
            <summary>Logical AND operator in Text Search - would allow combination with logical OR</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="PhillipMarsh">Phillip Marsh</reporter>
                        <labels>
                    </labels>
                <created>Wed, 8 Feb 2017 14:20:22 +0000</created>
                <updated>Tue, 4 Apr 2017 20:03:06 +0000</updated>
                            <resolved>Wed, 8 Feb 2017 15:49:50 +0000</resolved>
                                                                    <component>Text Search</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1540782" author="thomas.schubert" created="Tue, 4 Apr 2017 20:03:06 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=PhillipMarsh&quot; class=&quot;user-hover&quot; rel=&quot;PhillipMarsh&quot;&gt;PhillipMarsh&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thanks for your feedback, we&apos;ll keep it in mind when we implement this functionality.&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;br/&gt;
Thomas&lt;/p&gt;</comment>
                            <comment id="1495007" author="phillipmarsh" created="Wed, 8 Feb 2017 16:24:31 +0000"  >&lt;p&gt;Hi @Thomas Schubert,&lt;/p&gt;

&lt;p&gt;Thanks for your reply.&lt;/p&gt;

&lt;p&gt;The linked ticket references combining ORs with ANDs, but in the opposite way to mine (ie. (&quot;gas&quot; AND &quot;TTF&quot;) OR (&quot;gas&quot; AND &quot;Netherlands&quot;) OR (&quot;gas&quot; AND &quot;Rotterdam&quot;)) which should have the same result. Would it be possible to have an AND operator as well, even if it just translated to the OR structure before running the query?&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Phil&lt;/p&gt;</comment>
                            <comment id="1494949" author="thomas.schubert" created="Wed, 8 Feb 2017 15:49:35 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=PhillipMarsh&quot; class=&quot;user-hover&quot; rel=&quot;PhillipMarsh&quot;&gt;PhillipMarsh&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thanks for the improvement request. I&apos;ve marked this ticket as a duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22583&quot; title=&quot;Allow text search to OR exact phrases&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22583&quot;&gt;SERVER-22583&lt;/a&gt;, which is a request that looks for the same functionality. Please feel free to vote for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22583&quot; title=&quot;Allow text search to OR exact phrases&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22583&quot;&gt;SERVER-22583&lt;/a&gt; and watch it for updates.&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;br/&gt;
Thomas &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="264844">SERVER-22583</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 8 Feb 2017 15:49:35 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 45 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 45 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>
            <customfieldvalue>PhillipMarsh</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht25vr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsurjj:</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>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hs4h1z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>