[SERVER-20848] for 3.2, text search with languages use the wrong text index version (2 instead of 3) Created: 09/Oct/15  Updated: 27/Oct/15  Resolved: 22/Oct/15

Status: Closed
Project: Core Server
Component/s: Querying, Text Search
Affects Version/s: None
Fix Version/s: 3.2.0-rc1

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Platform A (10/09/15), Platform B (10/30/15)
Participants:

 Description   

So, if I have a collection foo with the text index:

db.foo.createIndex( { x: "text" }, { default_language: "french" } )

and the collection has the following documents

> db.foo.find()
{ "_id" : ObjectId("5617cdea6201ba0ae25c192d"), "x" : "répondez" }
{ "_id" : ObjectId("5617ce146201ba0ae25c192e"), "x" : "répondez", "language" : "fr" }
{ "_id" : ObjectId("5617d32e6201ba0ae25c192f"), "x" : "répondez", "language" : "fr" }
{ "_id" : ObjectId("5617d6456201ba0ae25c1930"), "x" : "répondez", "language" : "french" }
{ "_id" : ObjectId("5617d65d6201ba0ae25c1931"), "x" : "réponder", "language" : "french" }

But the $text search only finds one document:

> db.foo.find( { $text: {$search: "réponder", $language: "fr"} } )
{ "_id" : ObjectId("5617cdea6201ba0ae25c192d"), "x" : "répondez" }

Whereas in v3.0.5, it would find all of them



 Comments   
Comment by Githook User [ 22/Oct/15 ]

Author:

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

Message: SERVER-20848: text search of document with language field uses the wrong text index version (2 instead of 3)
Branch: master
https://github.com/mongodb/mongo/commit/3f01c3b16025b23b68e3d975ac153cdbcaa398db

Comment by J Rassi [ 09/Oct/15 ]

Tentatively assigning to mark.benvenuto; Mark, let me know if you don't have bandwidth to take this.

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