Copyright 2011-2016 Horde LLC (http://www.horde.org/)
Author: Chuck Hagenbuch (chuck@horde.org)
Example #1
0
 public function search($index, $type, $query)
 {
     try {
         return $this->_es->search($index, $type, $query);
     } catch (Horde_ElasticSearch_Exception $e) {
         throw new Content_Exception($e);
     }
 }
Example #2
0
<?php

/**
 * Basic example for getting status from ElasticSearch
 *
 * Copyright 2011-2015 Horde LLC (http://www.horde.org/)
 *
 * @author   Chuck Hagenbuch <*****@*****.**>
 * @license  http://www.horde.org/licenses/bsd BSD
 * @category Horde
 * @package  ElasticSearch
 */
require 'Horde/Autoloader/Default.php';
$client = new Horde_ElasticSearch_Client('http://localhost:9200/', new Horde_Http_Client());
var_dump($client->status());
$twitter = new Horde_ElasticSearch_Index('twitter', $client);
var_dump($twitter->status());