I am trying to build Chat system and for that I used
dmId like this “recipient_id-sender-id”
my objec looks like this
_id:62595a1c8c0fce4f9dbfc99e
content:DM Id added to db
creatorId:624f98d1db10f12db205b263
recipientId:6257e81d2a74d7363f621370
dmId:6257e81d2a74d7363f621370-624f98d1db10f12db205b263
postId:6258206b1f681ed05547fa90
createdAt:2022-04-15T11:42:20.753+00:00
but this gives me this error -
$text is not allowed in this atlas tier
Thanks for confirming your Atlas tier details and providing the aggregation pipeline in use. The above error is a bit odd as the $text operator you have used will not work in the pipeline provided in it’s current format. However, I have taken note of this as it may cause some confusion. In saying so, the pipeline will require a $match stage that contains the $text operator at the beginning similar to the following:
Additionally, could you provide the use case for using the $text operator in Atlas deployment? Since this is an Atlas deployment, I would recommend taking a look at using Atlas Search which allows fine-grained text indexing and querying of data on your Atlas cluster. You may find the following documentation useful regarding Atlas Search:
I would also recommend reviewing the Text Search in the Aggregation Pipeline documentation which provides another example of the $text operator being used in an aggregation pipeline.