this code always return 10 records, anyone knows how to set 100?
Is for use the API of Google Cloud Vision Product Search.
# get the name of the product set
$productSetPath = $productSearchClient->productSetName($projectId, $location, $productSetId);
# product search specific parameters
$productSearchParams = (new ProductSearchParams())
->setProductSet($productSetPath)
->setProductCategories([$productCategory]);
# search products similar to the image
$response = $imageAnnotatorClient->productSearch($image, $productSearchParams);
if ($productSearchResults = $response->getProductSearchResults()) {
$results = $productSearchResults->getResults(); //this always return 10 results.
foreach ($results as $result) {
# display the product information.
$product = $result->getProduct();
$productName = $product->getName();
}
}