Skip to content

Commit

Permalink
Handle Boolean Query differently in New API Version
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Meredith committed Jun 26, 2014
1 parent 46fe700 commit 03c9977
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion library/Amazon/Service/CloudSearch.php
Expand Up @@ -96,7 +96,16 @@ public function search($query_string)

public function booleanSearch($query_string)
{
$this->addParameter('bq', $query_string);
switch ($this->getApiVersion()) {
case self::API_VERSION_OLD:
$this->addParameter('bq', $query_string);
break;

case self::API_VERSION_NEW:
$this->addParameter('q.parser', 'structured');
$this->addParameter('q', $query_string);
break;
}

$uri = sprintf(
'%s/%s/%s?%s',
Expand Down

0 comments on commit 03c9977

Please sign in to comment.