Torann / laravel-cloudsearch

Index and search Laravel models on Amazon's CloudSearch
BSD 2-Clause "Simplified" License
22 stars 10 forks source link

cursor cannot be set, error message is displayed directly when an exception occurs #5

Open danielhuang-030 opened 6 years ago

danielhuang-030 commented 6 years ago

Hi, I found two issues when used:

  1. cursor cannot be set Because "string" == 0 will always returns true in PHP. https://github.com/Torann/laravel-cloudsearch/blob/5556db99b3217b4b7f10dfc82e30e25eececd114/src/Query/StructuredQueryBuilder.php#L142 After setting $cursor will only be "initial".

  2. error message is displayed directly when an exception occurs https://github.com/Torann/laravel-cloudsearch/blob/5556db99b3217b4b7f10dfc82e30e25eececd114/src/CloudSearcher.php#L194

Please help confirm, thanks.