[SERVER-18524] Different parsing for RLP index keys and queries leads to missing results Created: 18/May/15  Updated: 05/Feb/16  Resolved: 11/Jun/15

Status: Closed
Project: Core Server
Component/s: Text Search
Affects Version/s: 3.1.2
Fix Version/s: 3.1.5

Type: Bug Priority: Major - P3
Reporter: Kamran K. Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: 32qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

(function () {
    'use strict';
 
    var t = db.fts;
    t.drop();
 
    t.ensureIndex({a: 'text'});
    t.insert({a: 'hello.world', language: 'arabic'});
 
    assert.eq(t.find({$text: {$search: 'hello.world', $language: 'arabic'}}).itcount(), 1);
}());

Sprint: Platform 4 06/05/15, Platform 5 06/26/16
Participants:

 Description   

When using RLP, there seems to be different parsing for index keys and queries, which can lead to missing results:

> db.fts.ensureIndex({a: 'text'});
// The index is created
 
> db.fts.insert({a: 'hello.world', language: 'arabic'});
// Resultant index key from the RLP tokenizer: "{ : \"hello.world\", : 1.1 }"
 
> db.fts.find({$text: {$search: 'hello.world', $language: 'arabic'}}).itcount();
0
 
> db.fts.find({$text: {$search: 'hello.world', $language: 'arabic'}}).explain(true);
 
// Parsed terms:
"parsedTextQuery" : {
    "terms" : [
        "hello",
        "world"
    ],
    "negatedTerms" : [ ],
    "phrases" : [ ],
    "negatedPhrases" : [ ]
}



 Comments   
Comment by Githook User [ 11/Jun/15 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-18524: Different parsing for RLP index keys and queries leads to missing results
Branch: master
https://github.com/mongodb/mongo/commit/ad72bdb7555743edd6abdd6bcb1cf5ddf382ec83

Generated at Thu Feb 08 03:47:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.