#get Users Data in Array

29 messages · Page 1 of 1 (latest)

frosty bone
#

hello, i have list of user in array like this PosterId [18148422710, 13428633922, 221257741408, 563323559863]
i want to get the post made by this users so i did something like this in my code

        databaseId: Common.dataBasesId,
        collectionId: Common.postCollection,
        queries: [
          Query.orderDesc('postedAt'),
          Query.limit(15),
          Query.equal('repliedTo', ''),
          Query.search('uid', "[$feedPosterIds]"),
        ],
      );```

i have already index uid for `fullText`
Nothing is being returned, the outputted lenght its zero, please how do i achieve this?
frozen flame
frosty bone
frozen flame
# frosty bone

First of all, I don't see any Attribute postedAt. And uid seems to be a String, not a String[]?

flat sorrel
#

Okay, yes that's true but how do I achieve that now, being able to get the post of users from this string arrays

frozen flame
flat sorrel
#

It didn't, have done that too

frozen flame
flat sorrel
#

Yes, I have done that too

flat sorrel
#

Okay, this is what I want to achieve maybe I'm not doing it correctly.

I have users collection and a post collection

In users collection I have an userId attributes and follower and following attributes

Post collection consist of the post the user send from the app to the database.

In the App, I have people I am following.

So I want to get the post of those people I am following along with my own Post.

Please how do I achieve this?

frosty bone
#

Please support here....

frosty bone
chilly fable
#

contains query was added in 12.0.0

#

make sure you use v1.5 aswell

frosty bone
chilly fable
#

😞

frozen flame
frosty bone
frozen flame
frosty bone
#

please explain...

frozen flame
# frosty bone please explain...

You have an array of IDs and you want to get all Documents where uid contains any of them, right? But if you pass in all of them to Query.search(), Appwrite will return only Documenrs which contain all of them, which is, of course, non of them.

frosty bone
#

no, i dont think so @frozen flame , if thats true what about searching for a user name, it return using where mostly have those name

#

okay, i got you now @frozen flame

frosty bone
#

hello @quartz slate please whats your insight into this issue,
please i need a way to fix this so i can deploy to stores

thanks everyone

quartz slate
frosty bone
#

i'm so sorry boss

flat sorrel
#

Pls any idea 💡

frosty bone
#

m