-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.0.1
-
Component/s: Text Search
-
None
-
ALL
-
- Create a Collection "Plan"
- Create index for full text search
- Add a few records
- Run the query
I have a query -
db.getCollection('Plan').find( {$or:[ {"_id":{$in:["PLN000000020","PLN000000014"]}}, {$text:{$search:"test"}}] }) .sort( { "name": 1 }) .skip(0) .limit(10) .collation({locale:'en'})
There is an index on '_id' and a Full text search index ("$**":"text")
This query fails saying -
error processing query: ns=Apeiron.Plan limit=10Tree: $or\n _id $in [ \"PLN000000014\" \"PLN000000020\" ]\n TEXT : query=test, language=english, caseSensitive=0, diacriticSensitive=0, tag=NULL\nSort: { name: 1.0 }\nProj: {}\nCollation: { locale: \"en\" }\n planner returned error: Failed to produce a solution for TEXT under OR - other non-TEXT clauses under OR have to be indexed as well.
Is there a workaround for it ? How do I specify collation of a collection along with full text search index?