<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:46:20 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>[DOCS-3710] How does MongoDB text queries score documents?</title>
                <link>https://jira.mongodb.org/browse/DOCS-3710</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;I created an text index this way: &lt;/p&gt;

&lt;p&gt;db.myCollection.ensureIndex(&lt;/p&gt;
{firstName:&quot;text&quot;, lastName:&quot;text&quot;, email:&quot;text&quot;, birthDate:&quot;text&quot;}
&lt;p&gt;,{name:&quot;text_index&quot;, weights:{lastName:2, email:2}})&lt;/p&gt;

&lt;p&gt;so that I can set a threshold (maybe 3) as a minimum score to consider that 2 records are &quot;almost the same&quot;.&lt;/p&gt;

&lt;p&gt;Now I create example/dummy documents, for instance:&lt;/p&gt;

{firstName:&quot;ROBERT&quot;, lastName:&quot;LANE&quot;, email: &quot;imnotxavier@mail.com&quot;}

&lt;p&gt; and perform this query db.myCollection.find({$text:{$search: &quot;ROBERT LANE&quot;}},{score:{$meta:&quot;textScore&quot;}})&lt;/p&gt;

&lt;p&gt;I get this:&lt;/p&gt;

{ &quot;_id&quot; : ObjectId(&quot;53b6c9f12a48e559dec0f6ab&quot;), &quot;firstName&quot; : &quot;ROBERT&quot;, &quot;lastName&quot; : &quot;LANE&quot;, &quot;email&quot; : &quot;imnotxavier@mail.com&quot;, &quot;score&quot; : 3.3000000000000003 }

&lt;p&gt;Why does MongoDB do this instead of returning a document with score==3?&lt;/p&gt;

&lt;p&gt;I need to know a little more about the details of the scoring system in order to correctly set a threshold and make better decisions.&lt;/p&gt;</description>
                <environment></environment>
        <key id="145508">DOCS-3710</key>
            <summary>How does MongoDB text queries score documents?</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="antonimmo">Antonio Quintana</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Jul 2014 15:42:48 +0000</created>
                <updated>Wed, 11 Jan 2017 22:39:59 +0000</updated>
                            <resolved>Wed, 9 Jul 2014 16:59:42 +0000</resolved>
                                    <version>mongodb-2.6</version>
                                    <fixVersion>01112017-cleanup</fixVersion>
                                    <component>manual</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="653293" author="kay.kim@10gen.com" created="Wed, 9 Jul 2014 16:59:42 +0000"  >&lt;p&gt;Will close this ticket as no change required to manual as information relates to internal mechanics. We can re-assess at a later date how much, if any, internal mechanics of this we should document.&lt;/p&gt;</comment>
                            <comment id="653287" author="kay.kim@10gen.com" created="Wed, 9 Jul 2014 16:56:51 +0000"  >&lt;p&gt;Hi Antonio &amp;#8211;&lt;br/&gt;
Scoring takes into consideration various other factors, such as the total field length, if the match is on the untokenized form of the word, how many times the word appears in the field, etc. &lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Kay Kim&lt;/p&gt;


</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 9 Jul 2014 16:56:51 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 32 weeks 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>jess.mokrzecki@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            9 years, 32 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>antonimmo</customfieldvalue>
            <customfieldvalue>kay.kim@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrqxd3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs095z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>125899</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrymyf:</customfieldvalue>

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