filter result based on user input #126
Unanswered
itsmefarhan
asked this question in
Q&A
Replies: 1 comment
-
AlgoliaQuery query = algolia.instance.index('users').query('test'); final data = await query.getObjects(); You need to use the filters method instead of facetFilter. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
in algolia I have an index "users" which contains username and email fields. I would like to filter the result by username. I think I am missing something here because my query doesnt work.
AlgoliaQuery query = algolia.instance.index('users').query('test'); // search word test
query = query.facetFilter('username:test'); // only where username is test
final data = await query.getObjects();
print(data.hits);
it prints empty list. Can anyone tell me how to fix it? Thanks
Beta Was this translation helpful? Give feedback.
All reactions