You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I run a query on a QA to get only the answers that satisfy the query but are not limited to 10?
Currently the results are limited to 10. If you set the size parameter of the QA query function to the max number of objects in the json and then run the query you will get all entries in the json not solely the ones that satisfy the query.
Context (Example): I have Question Answerer loaded with a json of 300 employees, 152 of which are Male. I want to run a query that returns me all 152 Males.
If I run the following I get 10 results:
s = qa.build_search(index='user_data_3')
s.query(sex='Male').execute()
So I set the size to the max number of employees, 300 but now I get 300 results, not a truncated 152 results that satisfy the query:
s = qa.build_search(index='user_data_3')
s.query(sex='Male', size=300).execute()
The text was updated successfully, but these errors were encountered:
The size function is working with .filter(), but not with .query(). Passing the parameters inside the filter solves this issue and gives only the required responses. That suffices for the current use case.
How can I run a query on a QA to get only the answers that satisfy the query but are not limited to 10?
Currently the results are limited to 10. If you set the size parameter of the QA query function to the max number of objects in the json and then run the query you will get all entries in the json not solely the ones that satisfy the query.
Context (Example): I have Question Answerer loaded with a json of 300 employees, 152 of which are Male. I want to run a query that returns me all 152 Males.
If I run the following I get 10 results:
s = qa.build_search(index='user_data_3')
s.query(sex='Male').execute()
So I set the size to the max number of employees, 300 but now I get 300 results, not a truncated 152 results that satisfy the query:
s = qa.build_search(index='user_data_3')
s.query(sex='Male', size=300).execute()
The text was updated successfully, but these errors were encountered: