[DOCS-16153] Text search documentation should explicitly say that it's not supported through the Stable API Created: 20/May/23  Updated: 30/Oct/23  Resolved: 12/Jul/23

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Dmitry Ryabtsev Assignee: Sarah Simpers
Resolution: Done Votes: 0
Labels: manual, server-docs-bug-bash
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 37 weeks, 5 days ago
Story Points: 2

 Description   

In strict API mode $text queries are failing becaue Text indexes weren't included into the scope of the Stable API:

$ mongosh "mongodb+srv://cluster1.fu4ty.mongodb.net" --apiVersion 1 --username admin --apiStrict
Enter password: ***
Current Mongosh Log ID: 646828b773b69b1d0be1e5fd
Connecting to:          mongodb+srv://<credentials>@cluster1.fu4ty.mongodb.net/?appName=mongosh+1.6.0
Using MongoDB:          (API Version 1)
Using Mongosh:          1.6.0
 
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
 
Warning: Found ~/.mongorc.js, but not ~/.mongoshrc.js. ~/.mongorc.js will not be loaded.
  You may want to copy or rename ~/.mongorc.js to ~/.mongoshrc.js.
Atlas atlas-11qc0x-shard-0 [primary] test> use test
already on db test
Atlas atlas-11qc0x-shard-0 [primary] test> db.reviews.find( { $text: { $search: "coffee -shop" } } )
Uncaught:
MongoServerError: error processing query: ns=test.reviewsTree: TEXT : query=coffee -shop, language=english, caseSensitive=0, diacriticSensitive=0, tag=NULL
Sort: {}
Proj: {}
 planner returned error :: caused by :: need exactly one text index for $text query

The documentation should explicitly state this limitation.

(Currently this can only be inferred from the line that says that text indexes can't be created)


Generated at Thu Feb 08 08:14:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.