2017 © Pedro Peláez
 

library cloudsearch-wrapper

image

phoogkamer/cloudsearch-wrapper

  • Wednesday, September 7, 2016
  • by phoogkamer
  • Repository
  • 6 Watchers
  • 3 Stars
  • 8,754 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 14 Versions
  • 13 % Grown

The README.md

CloudSearch Wrapper

A wrapper for the AWS SDK regarding CloudSearch. Provides a nicer, less error prone interface than the Amazon SDK for CloudSearch. Version 0.3.0 should be considered stable. I'm just not sure if the featureset is complete enough for a major version change., (*1)

Installation

composer require phoogkamer/cloudsearch-wrapper:0.3.*

Example usage

Below is a simple search example., (*2)

$client = new CloudSearchClient($endpoint, $key, $secret);

$query = new CloudSearchStructuredQuery();

//Adds a field (id:1)
$query->addField('id', 1);

//Will give max 15 results
$query->setSize(15);

//Currently $result is still the standard AWS SDK result
$result = $client->search($query);

You will most probably need something more advanced, like with And and Or statements. This is done like so:, (*3)

$query->addAnd(function(CloudSearchStructuredQuery $query)
{
    $query->addOr(function(CloudSearchStructuredQuery $query)
    {
        //Add string by setting the second parameter true
        $query->addField('title', 'Forged Alliance', true);

        $query->addField('title', 'Supreme Commander', true);
    });

    $query->addOr(function(CloudSearchStructuredQuery $query)
    {
        $query->addField('id', 1);

        //Gets everything within a range from 2 to 5
        $query->addRangeField('id', 2, 5);
    });
});

Note that it's easy to nest in an elegant way., (*4)

The Versions

07/09 2016

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

07/09 2016

dev-develop

dev-develop

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

09/08 2016

0.4.1

0.4.1.0

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

27/05 2016

1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

27/05 2016

dev-feature/aws-sdk-3-compatibility

dev-feature/aws-sdk-3-compatibility

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

21/03 2016

0.4.0

0.4.0.0

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

02/04 2015

0.3.0

0.3.0.0

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

26/02 2015

0.2.0

0.2.0.0

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

25/02 2015

0.1.5

0.1.5.0

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

09/02 2015

0.1.4

0.1.4.0

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

06/02 2015

0.1.3

0.1.3.0

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

06/02 2015

0.1.2

0.1.2.0

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

06/02 2015

0.1.1

0.1.1.0

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch

30/01 2015

0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

 

by Patrick Hoogkamer

amazon aws cloudsearch