Hello community,
here is the log from the commit of package php5-pear-Horde_ElasticSearch for
openSUSE:Factory checked in at 2015-01-20 19:01:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/php5-pear-Horde_ElasticSearch (Old)
and /work/SRC/openSUSE:Factory/.php5-pear-Horde_ElasticSearch.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "php5-pear-Horde_ElasticSearch"
Changes:
--------
---
/work/SRC/openSUSE:Factory/php5-pear-Horde_ElasticSearch/php5-pear-Horde_ElasticSearch.changes
2013-01-08 14:48:13.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.php5-pear-Horde_ElasticSearch.new/php5-pear-Horde_ElasticSearch.changes
2015-01-20 19:01:49.000000000 +0100
@@ -1,0 +2,12 @@
+Thu Jan 8 17:46:41 UTC 2015 - <[email protected]>
+
+- Version 1.0.3
+- [jan] Add Composer definition.
+
+-------------------------------------------------------------------
+Tue Mar 5 16:03:28 UTC 2013 - Ralf Lang <[email protected]>
+
+- Version 1.0.2
+- [rla] Add license file.
+
+-------------------------------------------------------------------
Old:
----
Horde_ElasticSearch-1.0.1.tgz
New:
----
Horde_ElasticSearch-1.0.3.tgz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ php5-pear-Horde_ElasticSearch.spec ++++++
--- /var/tmp/diff_new_pack.gQGuAo/_old 2015-01-20 19:01:50.000000000 +0100
+++ /var/tmp/diff_new_pack.gQGuAo/_new 2015-01-20 19:01:50.000000000 +0100
@@ -26,7 +26,7 @@
Group: Development/Libraries/PHP
Name: php5-pear-%{pear_name}
-Version: 1.0.1
+Version: 1.0.3
Release: 0
Source0: http://pear.horde.org/get/%{pear_name}-%{version}.tgz
## remove on next update - missing license fixed in upstream git
++++++ Horde_ElasticSearch-1.0.1.tgz -> Horde_ElasticSearch-1.0.3.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/add.php
new/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/add.php
--- old/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/add.php
2012-11-19 14:50:02.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/add.php
1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-<?php
-/**
- * Basic example for adding data to ElasticSearch
- *
- * Copyright 2011 Horde LLC (http://www.horde.org/)
- *
- * @author Chuck Hagenbuch <[email protected]>
- * @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());
-$twitter = new Horde_ElasticSearch_Index('twitter', $client);
-$tweet = new Horde_ElasticSearch_Type('tweet', $twitter);
-var_dump($tweet->add(1, '{
- "user": "kimchy",
- "post_date": "2009-11-15T13:12:00",
- "message": "Trying out elasticsearch, so far so good?"
-}'));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/count.php
new/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/count.php
--- old/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/count.php
2012-11-19 14:50:02.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/count.php
1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-<?php
-/**
- * Basic example for counting an ElasticSearch type
- *
- * Copyright 2011 Horde LLC (http://www.horde.org/)
- *
- * @author Chuck Hagenbuch <[email protected]>
- * @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());
-$twitter = new Horde_ElasticSearch_Index('twitter', $client);
-$tweet = new Horde_ElasticSearch_Type('tweet', $twitter);
-var_dump($tweet->count());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/get.php
new/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/get.php
--- old/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/get.php
2012-11-19 14:50:02.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/get.php
1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-<?php
-/**
- * Basic example for getting data from ElasticSearch
- *
- * Copyright 2011 Horde LLC (http://www.horde.org/)
- *
- * @author Chuck Hagenbuch <[email protected]>
- * @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());
-$twitter = new Horde_ElasticSearch_Index('twitter', $client);
-$tweet = new Horde_ElasticSearch_Type('tweet', $twitter);
-var_dump($tweet->get(1));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/map.php
new/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/map.php
--- old/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/map.php
2012-11-19 14:50:02.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/map.php
1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-<?php
-/**
- * Basic example for adding a mapping to ElasticSearch
- *
- * Copyright 2011 Horde LLC (http://www.horde.org/)
- *
- * @author Chuck Hagenbuch <[email protected]>
- * @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());
-$twitter = new Horde_ElasticSearch_Index('twitter', $client);
-$user = new Horde_ElasticSearch_Type('user', $twitter);
-var_dump($user->map('{
- "properties" : {
- "name" : { "type" : "string" }
- }
-}'));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/search.php
new/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/search.php
--- old/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/search.php
2012-11-19 14:50:02.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/search.php
1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-<?php
-/**
- * Basic example for searching with ElasticSearch
- *
- * Copyright 2011 Horde LLC (http://www.horde.org/)
- *
- * @author Chuck Hagenbuch <[email protected]>
- * @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());
-$twitter = new Horde_ElasticSearch_Index('twitter', $client);
-$tweet = new Horde_ElasticSearch_Type('tweet', $twitter);
-var_dump($tweet->search('elasticsearch'));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/status.php
new/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/status.php
--- old/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/status.php
2012-11-19 14:50:02.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.1/doc/Horde/ElasticSearch/examples/status.php
1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-<?php
-/**
- * Basic example for getting status from ElasticSearch
- *
- * Copyright 2011 Horde LLC (http://www.horde.org/)
- *
- * @author Chuck Hagenbuch <[email protected]>
- * @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());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Client.php
new/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Client.php
--- old/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Client.php
2012-11-19 14:50:02.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Client.php
1970-01-01 01:00:00.000000000 +0100
@@ -1,87 +0,0 @@
-<?php
-/**
- * ElasticSearch client class
- *
- * Copyright 2011 Horde LLC (http://www.horde.org/)
- *
- * @author Chuck Hagenbuch <[email protected]>
- * @license http://www.horde.org/licenses/bsd BSD
- * @category Horde
- * @package ElasticSearch
- */
-class Horde_ElasticSearch_Client
-{
- protected $_server = 'http://localhost:9200/';
- protected $_httpClient;
-
- public function __construct($server, Horde_Http_Client $httpClient)
- {
- $this->_server = $server;
- $this->_httpClient = $httpClient;
- }
-
- /**
- * curl -X GET {SERVER}/_status
- */
- public function status($index = null)
- {
- return $this->_request($this->_path($index, '_status'));
- }
-
- /**
- * curl -X GET {SERVER}/{INDEX}/{TYPE}/_search?q= ...
- */
- public function search($index, $type, $q)
- {
- return $this->_request($this->_path($index, $type, '_search') . '?' .
http_build_query(array('q' => $q)));
- }
-
- /**
- * curl -X GET {SERVER}/{INDEX}/{TYPE/{ID}
- */
- public function get($index, $type, $id)
- {
- return $this->_request($this->_path($index, $type, $id));
- }
-
- /**
- * curl -X PUT {SERVER}/{INDEX}/{TYPE}/{ID} -d ...
- */
- public function add($index, $type, $id, $data)
- {
- return $this->_request($this->_path($index, $type, $id), 'PUT', $data);
- }
-
- /**
- * curl -X GET {SERVER}/{INDEX}/{TYPE}/_count -d {matchAll:{}}
- */
- public function count($index, $type)
- {
- return $this->_request($this->_path($index, $type, '_count'), 'GET',
'{ matchAll:{} }');
- }
-
- /**
- * curl -X PUT {SERVER}/{INDEX}/{TYPE}/_mapping -d ...
- */
- public function map($index, $type, $data)
- {
- return $this->_request($this->_path($index, $type, '_mapping'), 'PUT',
$data);
- }
-
- protected function _request($path, $method = 'GET', $data = null, $headers
= array())
- {
- try {
- $result = $this->_httpClient->request($method, $this->_server .
$path, $data, $headers);
- return json_decode($result->getBody());
- } catch (Horde_Http_Exception $e) {
- throw new Horde_ElasticSearch_Exception($e->getMessage(),
$e->getCode(), $e);
- }
- }
-
- protected function _path()
- {
- $path = array_filter(func_get_args());
- foreach ($path as &$element) { $element = urlencode($element); }
- return implode('/', $path);
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Exception.php
new/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Exception.php
--- old/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Exception.php
2012-11-19 14:50:02.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Exception.php
1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-<?php
-/**
- * ElasticSearch exceptions
- *
- * Copyright 2011 Horde LLC (http://www.horde.org/)
- *
- * @author Chuck Hagenbuch <[email protected]>
- * @license http://www.horde.org/licenses/bsd BSD
- * @category Horde
- * @package ElasticSearch
- */
-class Horde_ElasticSearch_Exception extends Horde_Exception
-{
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Index.php
new/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Index.php
--- old/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Index.php
2012-11-19 14:50:02.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Index.php
1970-01-01 01:00:00.000000000 +0100
@@ -1,87 +0,0 @@
-<?php
-/**
- * ElasticSearch index class
- *
- * Copyright 2011 Horde LLC (http://www.horde.org/)
- *
- * @author Chuck Hagenbuch <[email protected]>
- * @license http://www.horde.org/licenses/bsd BSD
- * @category Horde
- * @package ElasticSearch
- */
-class Horde_ElasticSearch_Index
-{
- protected $_client;
- protected $_index;
-
- public function __construct($index, Horde_ElasticSearch_Client $client)
- {
- $this->_index = $index;
- $this->_client = $client;
- }
-
- /**
- * curl -X PUT {SERVER}/{INDEX}/
- */
- public function create()
- {
- $this->_client->request(null, 'PUT');
- }
-
- /**
- * curl -X DELETE {SERVER}/{INDEX}/
- */
- public function drop()
- {
- $this->_client->request(null, 'DELETE');
- }
-
- /**
- * curl -X GET {SERVER}/{INDEX}/_status
- */
- public function status()
- {
- return $this->_client->status($this->_index);
- }
-
- /**
- * curl -X GET {SERVER}/{INDEX}/{TYPE}/_search?q= ...
- */
- public function search($type, $q)
- {
- return $this->_client->search($this->_index, $type, $q);
- }
-
- /**
- * curl -XGET {SERVER}/{INDEX}/{TYPE/{ID}
- */
- public function get($type, $id)
- {
- return $this->_client->get($this->_index, $type, $id);
- }
-
- /**
- * curl -X PUT {SERVER}/{INDEX}/{TYPE}/{ID} -d ...
- */
- public function add($type, $id, $data)
- {
- return $this->_client->add($this->_index, $type, $id, $data);
- }
-
- /**
- * curl -X GET {SERVER}/{INDEX}/{TYPE}/_count -d {matchAll:{}}
- */
- public function count($type)
- {
- return $this->_client->count($this->_index, $type);
- }
-
- /**
- * curl -X PUT {SERVER}/{INDEX}/{TYPE}/_mapping -d ...
- */
- public function map($type, $data)
- {
- return $this->_client->map($this->_index, $type, $data);
- return $this->call($type . '/_mapping', array('method' => 'PUT',
'content' => $data));
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Type.php
new/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Type.php
--- old/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Type.php
2012-11-19 14:50:02.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.1/lib/Horde/ElasticSearch/Type.php
1970-01-01 01:00:00.000000000 +0100
@@ -1,62 +0,0 @@
-<?php
-/**
- * ElasticSearch type class
- *
- * Copyright 2011 Horde LLC (http://www.horde.org/)
- *
- * @author Chuck Hagenbuch <[email protected]>
- * @license http://www.horde.org/licenses/bsd BSD
- * @category Horde
- * @package ElasticSearch
- */
-class Horde_ElasticSearch_Type
-{
- protected $_type;
- protected $_index;
-
- public function __construct($type, Horde_ElasticSearch_Index $index)
- {
- $this->_type = $type;
- $this->_index = $index;
- }
-
- /**
- * curl -X GET {SERVER}/{INDEX}/{TYPE}/_search?q= ...
- */
- public function search($q)
- {
- return $this->_index->search($this->_type, $q);
- }
-
- /**
- * curl -XGET {SERVER}/{INDEX}/{TYPE/{ID}
- */
- public function get($id)
- {
- return $this->_index->get($this->_type, $id);
- }
-
- /**
- * curl -X PUT {SERVER}/{INDEX}/{TYPE}/{ID} -d ...
- */
- public function add($id, $data)
- {
- return $this->_index->add($this->_type, $id, $data);
- }
-
- /**
- * curl -X GET {SERVER}/{INDEX}/{TYPE}/_count -d {matchAll:{}}
- */
- public function count()
- {
- return $this->_index->count($this->_type);
- }
-
- /**
- * curl -X PUT {SERVER}/{INDEX}/{TYPE}/_mapping -d ...
- */
- public function map($data)
- {
- return $this->_index->map($this->_type, $data);
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/COPYING
new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/COPYING
--- old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/COPYING
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/COPYING
2015-01-08 12:51:57.000000000 +0100
@@ -0,0 +1,24 @@
+Copyright 2011-2015 Horde LLC (http://www.horde.org/). All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HORDE PROJECT
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/add.php
new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/add.php
--- old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/add.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/add.php
2015-01-08 12:51:57.000000000 +0100
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Basic example for adding data to ElasticSearch
+ *
+ * Copyright 2011-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @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());
+$twitter = new Horde_ElasticSearch_Index('twitter', $client);
+$tweet = new Horde_ElasticSearch_Type('tweet', $twitter);
+var_dump($tweet->add(1, '{
+ "user": "kimchy",
+ "post_date": "2009-11-15T13:12:00",
+ "message": "Trying out elasticsearch, so far so good?"
+}'));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/count.php
new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/count.php
--- old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/count.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/count.php
2015-01-08 12:51:57.000000000 +0100
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Basic example for counting an ElasticSearch type
+ *
+ * Copyright 2011-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @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());
+$twitter = new Horde_ElasticSearch_Index('twitter', $client);
+$tweet = new Horde_ElasticSearch_Type('tweet', $twitter);
+var_dump($tweet->count());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/get.php
new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/get.php
--- old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/get.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/get.php
2015-01-08 12:51:57.000000000 +0100
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Basic example for getting data from ElasticSearch
+ *
+ * Copyright 2011-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @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());
+$twitter = new Horde_ElasticSearch_Index('twitter', $client);
+$tweet = new Horde_ElasticSearch_Type('tweet', $twitter);
+var_dump($tweet->get(1));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/map.php
new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/map.php
--- old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/map.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/map.php
2015-01-08 12:51:57.000000000 +0100
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Basic example for adding a mapping to ElasticSearch
+ *
+ * Copyright 2011-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @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());
+$twitter = new Horde_ElasticSearch_Index('twitter', $client);
+$user = new Horde_ElasticSearch_Type('user', $twitter);
+var_dump($user->map('{
+ "properties" : {
+ "name" : { "type" : "string" }
+ }
+}'));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/search.php
new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/search.php
--- old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/search.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/search.php
2015-01-08 12:51:57.000000000 +0100
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Basic example for searching with ElasticSearch
+ *
+ * Copyright 2011-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @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());
+$twitter = new Horde_ElasticSearch_Index('twitter', $client);
+$tweet = new Horde_ElasticSearch_Type('tweet', $twitter);
+var_dump($tweet->search('elasticsearch'));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/status.php
new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/status.php
--- old/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/status.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.3/doc/Horde/ElasticSearch/examples/status.php
2015-01-08 12:51:57.000000000 +0100
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Basic example for getting status from ElasticSearch
+ *
+ * Copyright 2011-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @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());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Client.php
new/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Client.php
--- old/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Client.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Client.php
2015-01-08 12:51:57.000000000 +0100
@@ -0,0 +1,87 @@
+<?php
+/**
+ * ElasticSearch client class
+ *
+ * Copyright 2011-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package ElasticSearch
+ */
+class Horde_ElasticSearch_Client
+{
+ protected $_server = 'http://localhost:9200/';
+ protected $_httpClient;
+
+ public function __construct($server, Horde_Http_Client $httpClient)
+ {
+ $this->_server = $server;
+ $this->_httpClient = $httpClient;
+ }
+
+ /**
+ * curl -X GET {SERVER}/_status
+ */
+ public function status($index = null)
+ {
+ return $this->_request($this->_path($index, '_status'));
+ }
+
+ /**
+ * curl -X GET {SERVER}/{INDEX}/{TYPE}/_search?q= ...
+ */
+ public function search($index, $type, $q)
+ {
+ return $this->_request($this->_path($index, $type, '_search') . '?' .
http_build_query(array('q' => $q)));
+ }
+
+ /**
+ * curl -X GET {SERVER}/{INDEX}/{TYPE/{ID}
+ */
+ public function get($index, $type, $id)
+ {
+ return $this->_request($this->_path($index, $type, $id));
+ }
+
+ /**
+ * curl -X PUT {SERVER}/{INDEX}/{TYPE}/{ID} -d ...
+ */
+ public function add($index, $type, $id, $data)
+ {
+ return $this->_request($this->_path($index, $type, $id), 'PUT', $data);
+ }
+
+ /**
+ * curl -X GET {SERVER}/{INDEX}/{TYPE}/_count -d {matchAll:{}}
+ */
+ public function count($index, $type)
+ {
+ return $this->_request($this->_path($index, $type, '_count'), 'GET',
'{ matchAll:{} }');
+ }
+
+ /**
+ * curl -X PUT {SERVER}/{INDEX}/{TYPE}/_mapping -d ...
+ */
+ public function map($index, $type, $data)
+ {
+ return $this->_request($this->_path($index, $type, '_mapping'), 'PUT',
$data);
+ }
+
+ protected function _request($path, $method = 'GET', $data = null, $headers
= array())
+ {
+ try {
+ $result = $this->_httpClient->request($method, $this->_server .
$path, $data, $headers);
+ return json_decode($result->getBody());
+ } catch (Horde_Http_Exception $e) {
+ throw new Horde_ElasticSearch_Exception($e->getMessage(),
$e->getCode(), $e);
+ }
+ }
+
+ protected function _path()
+ {
+ $path = array_filter(func_get_args());
+ foreach ($path as &$element) { $element = urlencode($element); }
+ return implode('/', $path);
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Exception.php
new/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Exception.php
--- old/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Exception.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Exception.php
2015-01-08 12:51:57.000000000 +0100
@@ -0,0 +1,14 @@
+<?php
+/**
+ * ElasticSearch exceptions
+ *
+ * Copyright 2011-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package ElasticSearch
+ */
+class Horde_ElasticSearch_Exception extends Horde_Exception
+{
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Index.php
new/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Index.php
--- old/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Index.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Index.php
2015-01-08 12:51:57.000000000 +0100
@@ -0,0 +1,86 @@
+<?php
+/**
+ * ElasticSearch index class
+ *
+ * Copyright 2011-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package ElasticSearch
+ */
+class Horde_ElasticSearch_Index
+{
+ protected $_client;
+ protected $_index;
+
+ public function __construct($index, Horde_ElasticSearch_Client $client)
+ {
+ $this->_index = $index;
+ $this->_client = $client;
+ }
+
+ /**
+ * curl -X PUT {SERVER}/{INDEX}/
+ */
+ public function create()
+ {
+ $this->_client->request(null, 'PUT');
+ }
+
+ /**
+ * curl -X DELETE {SERVER}/{INDEX}/
+ */
+ public function drop()
+ {
+ $this->_client->request(null, 'DELETE');
+ }
+
+ /**
+ * curl -X GET {SERVER}/{INDEX}/_status
+ */
+ public function status()
+ {
+ return $this->_client->status($this->_index);
+ }
+
+ /**
+ * curl -X GET {SERVER}/{INDEX}/{TYPE}/_search?q= ...
+ */
+ public function search($type, $q)
+ {
+ return $this->_client->search($this->_index, $type, $q);
+ }
+
+ /**
+ * curl -XGET {SERVER}/{INDEX}/{TYPE/{ID}
+ */
+ public function get($type, $id)
+ {
+ return $this->_client->get($this->_index, $type, $id);
+ }
+
+ /**
+ * curl -X PUT {SERVER}/{INDEX}/{TYPE}/{ID} -d ...
+ */
+ public function add($type, $id, $data)
+ {
+ return $this->_client->add($this->_index, $type, $id, $data);
+ }
+
+ /**
+ * curl -X GET {SERVER}/{INDEX}/{TYPE}/_count -d {matchAll:{}}
+ */
+ public function count($type)
+ {
+ return $this->_client->count($this->_index, $type);
+ }
+
+ /**
+ * curl -X PUT {SERVER}/{INDEX}/{TYPE}/_mapping -d ...
+ */
+ public function map($type, $data)
+ {
+ return $this->_client->map($this->_index, $type, $data);
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Type.php
new/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Type.php
--- old/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Type.php
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_ElasticSearch-1.0.3/lib/Horde/ElasticSearch/Type.php
2015-01-08 12:51:57.000000000 +0100
@@ -0,0 +1,62 @@
+<?php
+/**
+ * ElasticSearch type class
+ *
+ * Copyright 2011-2015 Horde LLC (http://www.horde.org/)
+ *
+ * @author Chuck Hagenbuch <[email protected]>
+ * @license http://www.horde.org/licenses/bsd BSD
+ * @category Horde
+ * @package ElasticSearch
+ */
+class Horde_ElasticSearch_Type
+{
+ protected $_type;
+ protected $_index;
+
+ public function __construct($type, Horde_ElasticSearch_Index $index)
+ {
+ $this->_type = $type;
+ $this->_index = $index;
+ }
+
+ /**
+ * curl -X GET {SERVER}/{INDEX}/{TYPE}/_search?q= ...
+ */
+ public function search($q)
+ {
+ return $this->_index->search($this->_type, $q);
+ }
+
+ /**
+ * curl -XGET {SERVER}/{INDEX}/{TYPE/{ID}
+ */
+ public function get($id)
+ {
+ return $this->_index->get($this->_type, $id);
+ }
+
+ /**
+ * curl -X PUT {SERVER}/{INDEX}/{TYPE}/{ID} -d ...
+ */
+ public function add($id, $data)
+ {
+ return $this->_index->add($this->_type, $id, $data);
+ }
+
+ /**
+ * curl -X GET {SERVER}/{INDEX}/{TYPE}/_count -d {matchAll:{}}
+ */
+ public function count()
+ {
+ return $this->_index->count($this->_type);
+ }
+
+ /**
+ * curl -X PUT {SERVER}/{INDEX}/{TYPE}/_mapping -d ...
+ */
+ public function map($data)
+ {
+ return $this->_index->map($this->_type, $data);
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/package.xml new/package.xml
--- old/package.xml 2012-11-19 14:50:02.000000000 +0100
+++ new/package.xml 2015-01-08 12:51:57.000000000 +0100
@@ -16,38 +16,41 @@
<email>[email protected]</email>
<active>yes</active>
</lead>
- <date>2012-11-19</date>
- <time>14:50:02</time>
+ <date>2015-01-08</date>
+ <time>12:51:57</time>
<version>
- <release>1.0.1</release>
+ <release>1.0.3</release>
<api>1.0.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
- <license uri="http://www.horde.org/licenses/bsd">BSD</license>
+ <license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
-* [mms] Use new Horde_Test layout.
+* [jan] Add Composer definition.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
- <file baseinstalldir="/" md5sum="1f255272bb3c81fd5f3684881d8237f2"
name="doc/Horde/ElasticSearch/examples/add.php" role="doc" />
- <file baseinstalldir="/" md5sum="441aa1b20e65cb77a97e9905ff67354c"
name="doc/Horde/ElasticSearch/examples/count.php" role="doc" />
- <file baseinstalldir="/" md5sum="ade8627d621454dee948484e73b3cb20"
name="doc/Horde/ElasticSearch/examples/get.php" role="doc" />
- <file baseinstalldir="/" md5sum="204f4f65161bf1262208a9fa2f5ad6b5"
name="doc/Horde/ElasticSearch/examples/map.php" role="doc" />
- <file baseinstalldir="/" md5sum="dadac816d8f07f49863d51c083ff6d43"
name="doc/Horde/ElasticSearch/examples/search.php" role="doc" />
- <file baseinstalldir="/" md5sum="8ababbc758afbf7ec16bf332feb8576e"
name="doc/Horde/ElasticSearch/examples/status.php" role="doc" />
- <file baseinstalldir="/" md5sum="0af7de54145b992d6815039eef9eeed6"
name="lib/Horde/ElasticSearch/Client.php" role="php" />
- <file baseinstalldir="/" md5sum="8ca2aa5ed5cd83f0415ff82a462d606a"
name="lib/Horde/ElasticSearch/Exception.php" role="php" />
- <file baseinstalldir="/" md5sum="8d1f0e559e20a0b3d9217ba58670c5f8"
name="lib/Horde/ElasticSearch/Index.php" role="php" />
- <file baseinstalldir="/" md5sum="4234a877aaa27eb2e26ba68630b6e07d"
name="lib/Horde/ElasticSearch/Type.php" role="php" />
+ <file baseinstalldir="/" md5sum="3f267b7a85acbaebaf239a8dfa50fcad"
name="doc/Horde/ElasticSearch/examples/add.php" role="doc" />
+ <file baseinstalldir="/" md5sum="ed21eb0639049662020f31cdddb7ffe8"
name="doc/Horde/ElasticSearch/examples/count.php" role="doc" />
+ <file baseinstalldir="/" md5sum="b958a59ded5eaee7381b61cc59d81cf7"
name="doc/Horde/ElasticSearch/examples/get.php" role="doc" />
+ <file baseinstalldir="/" md5sum="0e26c358d6c25ddcff7f649842143ce4"
name="doc/Horde/ElasticSearch/examples/map.php" role="doc" />
+ <file baseinstalldir="/" md5sum="5bf17e7ad906dff2410f08dfa75833ba"
name="doc/Horde/ElasticSearch/examples/search.php" role="doc" />
+ <file baseinstalldir="/" md5sum="7b50e82a8917b1657b739084f69bad94"
name="doc/Horde/ElasticSearch/examples/status.php" role="doc" />
+ <file baseinstalldir="/" md5sum="2b77d9ef7b83a258c2e96c5a11c3a45d"
name="doc/Horde/ElasticSearch/COPYING" role="doc" />
+ <file baseinstalldir="/" md5sum="0f3ade26aaf598db9b84c23c7472c3dc"
name="lib/Horde/ElasticSearch/Client.php" role="php" />
+ <file baseinstalldir="/" md5sum="03b0aff608db7dadfe5812df3944ed47"
name="lib/Horde/ElasticSearch/Exception.php" role="php" />
+ <file baseinstalldir="/" md5sum="4d29b25080e556c8d47e47fdfb065b8d"
name="lib/Horde/ElasticSearch/Index.php" role="php" />
+ <file baseinstalldir="/" md5sum="7b46a3667bea1dc1dcc856ece54979bf"
name="lib/Horde/ElasticSearch/Type.php" role="php" />
</dir>
</contents>
<dependencies>
<required>
<php>
<min>5.3.0</min>
+ <max>6.0.0alpha1</max>
+ <exclude>6.0.0alpha1</exclude>
</php>
<pearinstaller>
<min>1.7.0</min>
@@ -70,6 +73,7 @@
</dependencies>
<phprelease>
<filelist>
+ <install as="COPYING" name="doc/Horde/ElasticSearch/COPYING" />
<install as="examples/add.php"
name="doc/Horde/ElasticSearch/examples/add.php" />
<install as="examples/count.php"
name="doc/Horde/ElasticSearch/examples/count.php" />
<install as="examples/get.php"
name="doc/Horde/ElasticSearch/examples/get.php" />
@@ -94,7 +98,7 @@
<release>beta</release>
<api>beta</api>
</stability>
- <license uri="http://www.horde.org/licenses/bsd">BSD</license>
+ <license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
* First beta release for Horde 5.
</notes>
@@ -109,7 +113,7 @@
<api>beta</api>
</stability>
<date>2012-07-22</date>
- <license uri="http://www.horde.org/licenses/bsd">BSD</license>
+ <license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
* [jan] Fix dependency on Horde_Http.
</notes>
@@ -124,7 +128,7 @@
<api>stable</api>
</stability>
<date>2012-10-30</date>
- <license uri="http://www.horde.org/licenses/bsd">BSD</license>
+ <license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
* First stable release for Horde 5.
</notes>
@@ -139,10 +143,40 @@
<api>stable</api>
</stability>
<date>2012-11-19</date>
- <license uri="http://www.horde.org/licenses/bsd">BSD</license>
+ <license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
* [mms] Use new Horde_Test layout.
</notes>
</release>
+ <release>
+ <version>
+ <release>1.0.2</release>
+ <api>1.0.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2013-03-05</date>
+ <license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
+ <notes>
+* [rla] Add license file.
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.0.3</release>
+ <api>1.0.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2015-01-08</date>
+ <license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
+ <notes>
+* [jan] Add Composer definition.
+ </notes>
+ </release>
</changelog>
</package>
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]