I have an observable posts$
where it holds the result of the query.
I want to search the posts by keywords in a specific userID.
The query should be read llike this:
Search posts where userid = 1 and keywords = (what has been typed in a search field)
This is my code and it doesn't give any results.
this.posts$ = this.afs.collection('posts', ref => ref
.where('userid', '==', this.userID)
.where('keywords', 'array-contains', query.toLowerCase())
.orderBy('created_at', 'desc')
).valueChanges({idField: 'id'});