[SERVER-13021] $text queries fail if an ascending index on "_fts" exists Created: 04/Mar/14  Updated: 25/Nov/15  Resolved: 25/Nov/15

Status: Closed
Project: Core Server
Component/s: Text Search
Affects Version/s: 2.6.0-rc0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: J Rassi
Resolution: Duplicate Votes: 1
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-19519 Text search crashes server when a non... Closed
Related
Operating System: ALL
Participants:

 Description   

> db.foo.ensureIndex({a:"text"})
WriteResult({ "nInserted" : 1 })
> db.foo.insert({a:"hello world"})
WriteResult({ "nInserted" : 1 })
> db.foo.find({$text:{$search:"hello"}}) // works before creating {_fts:1} index
{ "_id" : ObjectId("53151b403d6c9988adb3eed8"), "a" : "hello world" }
> db.foo.ensureIndex({_fts:1})
WriteResult({ "nInserted" : 1 })
> db.foo.find({$text:{$search:"hello"}}) // fails after creating {_fts:1} index
error: {
	"$err" : "Unable to execute query: error processing query: ns=test.foo limit=0 skip=0\nTree: TEXT : query=hello, language = , tag=First: 0 1 notFirst: full path: _fts\nSort: {}\nProj: {}\n planner returned error: need exactly one text index for $text query",
	"code" : 17007
}
>



 Comments   
Comment by J Rassi [ 25/Nov/15 ]

Closing as a duplicate of SERVER-19519.

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