While searching a product_set using command line, we can set a parameter features.max Results to limit the number of items returned in the response.
Field-specific considerations:
features.maxResults - The maximum number of results to be returned.
But how can I pass this parameter while running the python script provided here?
Also, does this parameter affect the response time?
The documentation is really not very well written, but I found that you just have to add the parameter
max_results=<max>inside the methodproduct_searchas following:To confirm that it works, I've added the an debug line inside the file on the google library
/usr/local/lib/python3.7/dist-packages/google/cloud/vision_helpers/decorators.pyAnd when I run the code, I get the printout of the request made to the api, and as you can see, the parameter is correctly defined:
Result: