2017 © Pedro Peláez
 

library acs-query-builder

Provides an object oriented way to programmatically build queries for the Amazon Cloud Search service

image

brighttalk/acs-query-builder

Provides an object oriented way to programmatically build queries for the Amazon Cloud Search service

  • Thursday, January 15, 2015
  • by ricoli
  • Repository
  • 11 Watchers
  • 7 Stars
  • 2,593 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 9 Versions
  • 2 % Grown

The README.md

Amazon Cloud Search Query Builder

Build Status, (*1)

Description

This library provides an object oriented way to programmatically build queries for the Amazon Cloud Search service. It's inspired by Doctrine's query builder. A query's __toString method will return a decoded string, as provided by the http_build_query function, (*2)

Installation

Add to your composer.json:, (*3)

"require": {
    ...
    "brighttalk/acs-query-builder": "dev-master"
}

Working with the Query Builder

$query = $qb->searchByFieldValue("fieldName", "'fieldValue'")
    ->setSize(20)
    ->setStart(0)
    ->setRank('-fieldName')
    ->getQuery();

echo $query;

would output bq=fieldName:'fieldValue'&start=0&size=20&rank=-fieldName (the "-" in the rank expression means it is in descending order - see the Amazon docs ), (*4)

The ExpressionBuilder

The supported expressions are: andX, orX, notX, eq, (*5)

Example:, (*6)

$query = $qb->setSearchExpression($qb->expr()->andx(
        $qb->expr()->eq("aFieldName", "'aFieldValue'"),
        $qb->expr()->notx($qb->expr()->eq("anotherFieldName", "'anotherFieldValue'"))
    ))
    ->setSize(20)
    ->setStart(0)
    ->getQuery();

echo $query;

would output bq=(and afieldName:'afieldValue' (not anotherFieldName:'anotherFieldValue'))&start=0&size=20, (*7)

The Versions

15/01 2015

dev-master

9999999-dev http://www.brighttalk.com

Provides an object oriented way to programmatically build queries for the Amazon Cloud Search service

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Ricardo Oliveira

15/01 2015

dev-develop

dev-develop http://www.brighttalk.com

Provides an object oriented way to programmatically build queries for the Amazon Cloud Search service

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Ricardo Oliveira

15/01 2015

0.5.0

0.5.0.0 http://www.brighttalk.com

Provides an object oriented way to programmatically build queries for the Amazon Cloud Search service

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Ricardo Oliveira

14/01 2015

0.4.0

0.4.0.0 http://www.brighttalk.com

Provides an object oriented way to programmatically build queries for the Amazon Cloud Search service

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Ricardo Oliveira

11/12 2014

0.3.0

0.3.0.0 http://www.brighttalk.com

Provides an object oriented way to programmatically build queries for the Amazon Cloud Search service

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Ricardo Oliveira

11/12 2014

0.2.0

0.2.0.0 http://www.brighttalk.com

Provides an object oriented way to programmatically build queries for the Amazon Cloud Search service

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Ricardo Oliveira

20/05 2014

dev-feature/travis_scrutinizer_improvements

dev-feature/travis_scrutinizer_improvements http://www.brighttalk.com

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Ricardo Oliveira

31/03 2014

0.1.0

0.1.0.0 http://www.brighttalk.com

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Ricardo Oliveira

24/03 2014

dev-feature/facets

dev-feature/facets http://www.brighttalk.com

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Ricardo Oliveira