[SERVER-60474] Better error message for $search when there is no search index Created: 05/Oct/21 Updated: 29/Oct/23 Resolved: 06/Feb/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.0-rc0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Oren Ovadia | Assignee: | Jacob Evans |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Participants: | |||||
| Description |
|
When running a $search on a community edition of mongodb we get the following error:
Instead we would want to have a more descriptive error message that $search is only available in Atlas.
marcus.eagan, FYI. Also I have marked this as low priority. |
| Comments |
| Comment by James Wahlin [ 10/May/23 ] | ||||||||||||||||||||
|
alice.neff@mongodb.com that is correct. This error message change is on version 6.2 and newer of the server. Let us know if you would like to request a backport to earlier versions. | ||||||||||||||||||||
| Comment by Alice Neff [ 10/May/23 ] | ||||||||||||||||||||
|
james.wahlin@mongodb.com - since I do not see any linked backport tickets, can assume this has not been backported to 6.0 and 5.0? cc ksenia.samokhvalova@mongodb.com elle.shwer@mongodb.com amy.jian@mongodb.com | ||||||||||||||||||||
| Comment by Githook User [ 04/Nov/22 ] | ||||||||||||||||||||
|
Author: {'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com', 'username': 'TedTuckman'}Message: | ||||||||||||||||||||
| Comment by Marcus Eagan (Inactive) [ 04/Oct/22 ] | ||||||||||||||||||||
|
The error for EA seems obtuse and less explicit. I understand there are correctness constraints. | ||||||||||||||||||||
| Comment by Amy Jian [ 04/Oct/22 ] | ||||||||||||||||||||
|
ted.tuckman@mongodb.com I'm not familiar if there is a common way to we refer to Atlas in community, but the new error message LGTM! For reference, what is the message for enterprise, non-Atlas users for this? | ||||||||||||||||||||
| Comment by Amy Jian [ 04/Oct/22 ] | ||||||||||||||||||||
|
ted.tuckman@mongodb.com I noticed in the PR that the error message will be "Search stages are not allowed without the enterprise module". To clarify, $search and $searchMeta is only available to Atlas customers - I want to confirm that this error accurately reflects that constraint since my own reaction to the proposed messaging is that it sounds like you need to be on EA for it to work (which we do not support). | ||||||||||||||||||||
| Comment by Marcus Eagan (Inactive) [ 15/Sep/22 ] | ||||||||||||||||||||
|
sgtm | ||||||||||||||||||||
| Comment by Elle Shwer [ 14/Sep/22 ] | ||||||||||||||||||||
|
Might I suggest we break this into two tickets: 1. Returning a more useful error for community users who try search (this ticket) And then the component about " empty array/test environment" I think requires more research on how valuable that might be. cc ruchir.mehta@mongodb.com | ||||||||||||||||||||
| Comment by Oren Ovadia [ 13/Sep/22 ] | ||||||||||||||||||||
| Comment by Marcus Eagan (Inactive) [ 23/Feb/22 ] | ||||||||||||||||||||
|
our growth has been hindered by the fact users cannot run the $search stage locally or in their managed environments. cailin.nelson had an interesting idea of returning an empty array so we don't break people's build pipelines. Maybe we can consider returning an empty array when customers don't have an Atlas cluster. | ||||||||||||||||||||
| Comment by Asya Kamsky [ 15/Feb/22 ] | ||||||||||||||||||||
|
marcus.eagan so for community and EA (not Atlas) the error should be "$search requires Atlas TFS index" - with or without additional phrase "and it's not found"? Because of sharding issues, I think error for Atlas $search when index is not found should be handled separately (and tracked in a separate ticket).
| ||||||||||||||||||||
| Comment by Marcus Eagan (Inactive) [ 15/Feb/22 ] | ||||||||||||||||||||
|
I think the error you have posted is good asya, as Googling it surfaces the appropriate link, which is what developers do with errors, and the api resource is `fts`. I would not worry too much about the breaking change, though we do need to explicitly state it as such, because this is a breaking change on an error. | ||||||||||||||||||||
| Comment by Asya Kamsky [ 14/Feb/22 ] | ||||||||||||||||||||
|
There seem to be three different issues when running $search, one in Atlas without text index created, one in EA (gives misleading/confusing error message), and in community (gives a possibly confusing error message that's different than EA message). I'd like to re-purpose this ticket to fix all of them. | ||||||||||||||||||||
| Comment by Anton Korshunov [ 11/Feb/22 ] | ||||||||||||||||||||
|
When executed on Enterprise build the following error message is returned:
| ||||||||||||||||||||
| Comment by David Storch [ 08/Feb/22 ] | ||||||||||||||||||||
|
Returning this to the QO team's triage queue, as it ended up in the "unassigned" state, | ||||||||||||||||||||
| Comment by Oren Ovadia [ 14/Dec/21 ] | ||||||||||||||||||||
|
Got it. | ||||||||||||||||||||
| Comment by Billy Donahue [ 14/Dec/21 ] | ||||||||||||||||||||
|
> Are enterprise builds only available on Atlas? Definitely not. | ||||||||||||||||||||
| Comment by Oren Ovadia [ 14/Dec/21 ] | ||||||||||||||||||||
|
Are enterprise builds only available on Atlas? | ||||||||||||||||||||
| Comment by Oren Ovadia [ 06/Dec/21 ] | ||||||||||||||||||||
|
Thanks Ribhav |