[11:36:53] <rebab> How do I find datas under 5 characters?
[11:42:53] <Derick> strings with less than 5 characters?
[11:44:51] <Derick> You can use the Aggregation Framework with $strLenBytes, and then match against that: https://docs.mongodb.com/v3.4/reference/operator/aggregation/strLenBytes/#single-byte-and-multibyte-character-set
[11:56:41] <rebab> I figure it out using regex ^.{0,150}$
[11:58:41] <rebab> Okay I'll study on it. Is there a way to remove same datas? I have a lot of data in my database. Some of them are the same. I want to remove them.
[11:59:01] <Derick> I don't think there is a database specific way
[11:59:08] <Derick> you'll have to do that in a script or program
[16:03:54] <wfq> how can I force that a one to one relationship from document to document ensure that the referenced document exists in the database at saving time. Do I need to do a read first?
[16:04:51] <wfq> I don't want to use embedded documents
[16:11:18] <wfq> or where can I find specific information about constraints in one-to-one relationships please?
[16:11:39] <Derick> there are no foreign keys in MongoDB
[16:16:46] <wfq> Derick, yes. I keep forgetting this. The only way is by firing a reading query and at that mongodb is very fast, I guess the argument would be
[22:11:01] <binarylegit> Hello, We are using MongoDB 3.4, We have an external service attempting to connect directly to a secondary, but it appears that it must first auth to the primary in order to run any queries. Is that documented anywhere? or am I misunderstanding something?