and this below is my function in which i want nested query to get the desired result - @override
Future<List<Document>> getSavedBlogsByHashtag(
String hastag, UserModel user) async {
final documents = await _db.listDocuments(
databaseId: AppConstants.APPWRITE_DATABASE_ID,
collectionId: AppConstants.APPWRITE_BLOGS_COLLECTION,
queries: [
Query.equal('\$id', user.SavedPosts),
Query.search('hastags', hastag),
Query.orderDesc('createdAt'),
Query.limit(100),
]);
return documents.documents;
}
The last one should work
What are you getting back?
i am getting a blank screen with a laoder
but i tried printing hashtag in function
it is correct
the function is getting the hashtag
Try to print it and surround it with try catch like so and share the results
@override
Future<List<Document>> getSavedBlogsByHashtag(
String hastag, UserModel user) async {
try {
final documents = await _db.listDocuments(
databaseId: AppConstants.APPWRITE_DATABASE_ID,
collectionId: AppConstants.APPWRITE_BLOGS_COLLECTION,
queries: [
Query.equal('\$id', user.SavedPosts),
Query.search('hastags', hastag),
Query.orderDesc('createdAt'),
Query.limit(100),
]);
print(documents);
return documents.documents;
} catch (e){
print(e);
return null;
}
}
getting this - Documents: Instance of 'DocumentList'
And this
print(documents.documents);
Documents.documents: []
So
$idalone workshashtagsalone works- Togther doesn't work ?
Yeah first two functions are working fine but not the third one
This is weird just tested it and it should work
Can you try with other hashtags?
maybe is a index issue? π€
I think in that case it should give error that hastags is not a fulltext index
But it's worth checking is hashtags has fulltext index on it?
If I'm not wrong from v1.3 you won't get index error
Also for fullText?
I'm not sure to be honest
Strict indexes for queries in Appwrite 1.3 are no longer necessary! If you ever used Appwrite Databases, chances are, you have seen the error β οΈIndex Not Found. Such strict indexes can get in the way during development and can be a blocker to some use cases with complex filtering possibilities. With Appwrite 1.3, you are no longer going to get errors telling you to set up an index.
I found this from v1.3 release
π€£ I hope we don't let you full text search without index
Tha
That's not a good idea at all
Recommended threads
- login With OAuth Failed
login With OAuth Failed: when i cliick to login with any of the following (facebook, gmail or apple) am being redirected out of the app to enter my detail, afte...
- Flutter OAuth2 webAuth Bug?
I created with flutter an app where I can login in with my Microsoft Account. When I compile it to Web (WASM) or Android (aab) then there is no problem what so ...
- Synchronous Function Execution Timed Out...
Hi Appwrite team π Iβm facing a synchronous function execution timeout issue on Appwrite Cloud and would appreciate some guidance. I executed this function u...