Realm Partition key where UserId in particular RealmList<Strings> java

Hi, I am creating a complex chat app having group chats, 1 to 1 chats and more features, so I want a _partiton key where I can check if a list contains a particular user or not.

SyncConfiguration config = new SyncConfiguration.Builder(app.currentUser()
                    ,userId+":{ " +"\"%in\":id}")

I want a config something like that where userId is present in id which is a RealmList.
can you suggest a right way as “userId+”:{ " +""%in":id}"" this expression is afcorse not working.

hey @aman_shukla1 We have a couple articles that might help here -

these two articles are building a chat app with partition based sync -

And this one uses our new flexible sync -

Flexible sync does not have the capability yet to do an IN query like you are suggesting above yet. But we are working on it now and hope to release it soon.


Hi Ian,

Thanks for your reply, actually flexible sync will me much suitable for me but I have a doubt as it is in preview mode so If I launch my app after 2 months then it will be ok or I should not use flexible sync in production.

@aman_shukla1 We hope to release this year - feel free to reach out to me at and we can chat.