Permalink
Browse files

Exception refactoring. Or filter added, Terms query added. Code refac…

…toring.
  • Loading branch information...
1 parent 4e0ad94 commit b84e2f270056c558c375968a48f78f3e85ab3edb @ruflin committed Feb 2, 2011
Showing with 435 additions and 305 deletions.
  1. 0 README.markdown
  2. 0 build.xml
  3. +3 −3 lib/Elastica/Admin.php
  4. +48 −48 lib/Elastica/Client.php
  5. 0 lib/Elastica/Cluster.php
  6. +28 −28 lib/Elastica/Document.php
  7. +10 −0 lib/Elastica/Exception/Abstract.php
  8. +1 −1 lib/Elastica/Exception/Client.php
  9. +3 −3 lib/Elastica/{Exception.php → Exception/Invalid.php}
  10. +13 −0 lib/Elastica/Exception/NotImplemented.php
  11. +10 −10 lib/Elastica/Exception/Response.php
  12. 0 lib/Elastica/Field.php
  13. +5 −5 lib/Elastica/Filter.php
  14. 0 lib/Elastica/Filter/Abstract.php
  15. +15 −15 lib/Elastica/Filter/Bool.php
  16. 0 lib/Elastica/Filter/GeoBoundingBox.php
  17. 0 lib/Elastica/Filter/GeoDistance.php
  18. +23 −0 lib/Elastica/Filter/Or.php
  19. 0 lib/Elastica/Filter/Range.php
  20. +13 −13 lib/Elastica/Filter/Term.php
  21. 0 lib/Elastica/Filter/Terms.php
  22. +30 −30 lib/Elastica/Index.php
  23. +44 −44 lib/Elastica/Query.php
  24. 0 lib/Elastica/Query/Abstract.php
  25. 0 lib/Elastica/Query/Array.php
  26. +16 −16 lib/Elastica/Query/Bool.php
  27. 0 lib/Elastica/Query/Field.php
  28. 0 lib/Elastica/Query/Fuzzy.php
  29. 0 lib/Elastica/Query/MatchAll.php
  30. +42 −18 lib/Elastica/Query/QueryString.php
  31. 0 lib/Elastica/Query/Range.php
  32. +35 −14 lib/Elastica/Query/Term.php
  33. +39 −0 lib/Elastica/Query/Terms.php
  34. 0 lib/Elastica/Query/Wildcard.php
  35. 0 lib/Elastica/Request.php
  36. 0 lib/Elastica/Response.php
  37. 0 lib/Elastica/Result.php
  38. 0 lib/Elastica/ResultSet.php
  39. +33 −33 lib/Elastica/Type.php
  40. +23 −23 lib/Elastica/Type/Abstract.php
  41. 0 test/CodeSniffer/Standards/Xodoa/Sniffs/Commenting/ClassCommentSniff.php
  42. 0 test/CodeSniffer/Standards/Xodoa/Sniffs/Commenting/FileCommentSniff.php
  43. 0 test/CodeSniffer/Standards/Xodoa/Sniffs/Commenting/FunctionCommentSniff.php
  44. 0 test/CodeSniffer/Standards/Xodoa/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php
  45. 0 test/CodeSniffer/Standards/Xodoa/Sniffs/WhiteSpace/ScopeIndentSniff.php
  46. 0 test/CodeSniffer/Standards/Xodoa/XodoaCodingStandard.php
  47. 0 test/CodeSniffer/Standards/Xodoa/ruleset.xml
  48. 0 test/bootstrap.php
  49. 0 test/data/test.doc
  50. 0 test/data/test.docx
  51. 0 test/data/test.pdf
  52. 0 test/data/test.txt
  53. +1 −1 test/lib/Elastica/ClientTest.php
  54. 0 test/lib/Elastica/ExampleTest.php
  55. 0 test/lib/Elastica/Filter/GeoDistanceTest.php
  56. 0 test/lib/Elastica/IndexTest.php
  57. 0 test/lib/Elastica/Query/BoolTest.php
  58. 0 test/lib/Elastica/Query/QueryStringTest.php
  59. 0 test/lib/Elastica/ResultTest.php
  60. 0 test/lib/Elastica/TypeTest.php
  61. 0 test/phpunit.xml.dist
View
0 README.markdown 100644 → 100755
File mode changed.
View
0 build.xml 100644 → 100755
File mode changed.
View
6 lib/Elastica/Admin.php 100644 → 100755
@@ -13,14 +13,14 @@ class Elastica_Admin
* @param array $args Args
*/
public function addAliases(array $args) {
- throw new Elastica_Exception('Not implemented yet');
+ throw new Elastica_Exception_NotImplemented();
}
-
+
/**
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/indices/aliases/
* @param array $args Args
*/
public function removeAliases(array $args) {
- throw new Elastica_Exception('Not implemented yet');
+ throw new Elastica_Exception_NotImplemented();
}
}
View
96 lib/Elastica/Client.php 100644 → 100755
@@ -17,7 +17,7 @@ class Elastica_Client
* Default host
*/
const DEFAULT_HOST = 'localhost';
-
+
/**
* Number of seconds after a timeout occurs for every request
* If using indexing of file large value necessary.
@@ -58,44 +58,44 @@ public function __construct($host = self::DEFAULT_HOST, $port = self::DEFAULT_PO
public function getIndex($indexName) {
return new Elastica_Index($this, $indexName);
}
-
+
/**
* Returns host the client connects to
- *
+ *
* @return string Host
*/
public function getHost() {
return $this->_host;
}
-
+
/**
* Returns connection port of this client
- *
+ *
* @return int Connection port
*/
public function getPort() {
return intval($this->_port);
}
-
+
/**
* Uses _bulk to send documents to the server
- *
+ *
* Array of Elastica_Document as input. Index and type has to be
* set inside the document, because for bulk settings documents,
* documents can belong to any type and index
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/bulk/
* @param array $docs Array of Elastica_Document
* @return Elastica_Response Response object
- * @throws Elastica_Exception If docs is empty
+ * @throws Elastica_Exception_Invalid If docs is empty
*/
public function addDocuments(array $docs) {
-
+
if (empty($docs)) {
- throw new Elastica_Exception('Array has to consist of at least one element');
+ throw new Elastica_Exception_Invalid('Array has to consist of at least one element');
}
$path = '_bulk';
-
+
$queryString = '';
foreach($docs as $doc) {
$baseArray = array(
@@ -105,29 +105,29 @@ public function addDocuments(array $docs) {
'_id' => $doc->getId()
)
);
-
+
// Always newline needed
$queryString .= json_encode($baseArray) . PHP_EOL;
-
+
$docArray = array(
$doc->getType() => $doc->getData()
);
-
+
$queryString .= json_encode($docArray) . PHP_EOL;
}
-
+
return $this->request($path, Elastica_Request::PUT, $queryString);
}
-
+
public function deleteDocuments(array $docs) {
// TODO: similar to delete ids but with type and index inside files
throw new Elastica_Exception('not implemented yet');
}
-
-
+
+
/**
* Deletes documents with the given ids, index, type from the index
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/bulk/
* @param array $ids Document ids
* @param string $index Index name
@@ -140,7 +140,7 @@ public function deleteIds(array $ids, $index, $type) {
throw new Elastica_Exception('Array has to consist of at least one id');
}
$path = '_bulk';
-
+
$queryString = '';
foreach($ids as $id) {
$baseArray = array(
@@ -150,26 +150,26 @@ public function deleteIds(array $ids, $index, $type) {
'_id' => $id,
)
);
-
+
// Always newline needed
$queryString .= json_encode($baseArray) . PHP_EOL;
}
return $this->request($path, Elastica_Request::PUT, $queryString);
}
-
+
/**
* Bukl operation
- *
+ *
* Every entry in the params array has to exactly on array
* of the bulk operation. An example param array would be:
- *
+ *
* array(
* array('index' => array('_index' => 'test', '_type' => 'user', '_id' => '1')),
* array('user' => array('name' => 'hans')),
* array('delete' => array('_index' => 'test', '_type' => 'user', '_id' => '2'))
* );
- *
+ *
* @todo Test
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/bulk/
* @param array $params Parameter array
@@ -181,21 +181,21 @@ public function bulk(array $params) {
}
$path = '_bulk';
-
+
$queryString = '';
- foreach($params as $index => $baseArray) {
+ foreach($params as $index => $baseArray) {
// Always newline needed
$queryString .= json_encode($baseArray) . PHP_EOL;
}
return $this->request($path, Elastica_Request::PUT, $queryString);
}
-
+
/**
* Makes calls to the elasticsearch server based on this index
- *
+ *
* It's possible to make any REST query directly over this method
- *
+ *
* @param string $path Path to call
* @param string $method Rest method to use (GET, POST, DELETE, PUT)
* @param array $data OPTIONAL Arguments as array
@@ -205,22 +205,22 @@ public function request($path, $method, $data = array()) {
$request = new Elastica_Request($path, $method, $data);
return $this->_callService($request);
}
-
+
/**
* Optimizes all search indexes
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/indices/optimize/
* @return Elastica_Response Response object
*/
public function optimizeAll($args = array()) {
return $this->request('_optimize', Elastica_Request::POST, $args);
}
-
+
/**
* Makes calls to the elasticsearch server
- *
+ *
* All calls that are made to the server are down over this function
- *
+ *
* @param string $path Path to call
* @param string $method Rest method to use (GET, POST, DELETE, PUT)
* @param array $data OPTIONAL Arguments as array
@@ -229,52 +229,52 @@ public function optimizeAll($args = array()) {
protected function _callService(Elastica_Request $request) {
$conn = curl_init();
$baseUri = 'http://' . $this->getHost() . ':' . $this->getPort() . '/';
-
+
$baseUri .= $request->getPath();
-
+
curl_setopt($conn, CURLOPT_URL, $baseUri);
curl_setopt($conn, CURLOPT_TIMEOUT, self::TIMEOUT);
curl_setopt($conn, CURLOPT_PORT, $this->getPort());
curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1) ;
curl_setopt($conn, CURLOPT_CUSTOMREQUEST, $request->getMethod());
-
+
// TODO: REFACTOR
$data = $request->getData();
-
+
if (!empty($data)) {
if (is_array($data)) {
$content = json_encode($data);
} else {
$content = $data;
- }
+ }
// Escaping of / not necessary. Causes problems in base64 encoding of files
$content = str_replace('\/', '/', $content);
curl_setopt($conn, CURLOPT_POSTFIELDS, $content);
}
-
+
$start = microtime(true);
$response = curl_exec($conn);
$end = microtime(true);
-
+
// Checks if error exists
$errorNumber = curl_errno($conn);
$response = new Elastica_Response($response);
-
- if (defined('DEBUG') && DEBUG) {
+
+ if (defined('DEBUG') && DEBUG) {
$response->setQueryTime($end - $start);
$response->setTransferInfo(curl_getinfo($conn));
}
-
+
if ($response->hasError()) {
throw new Elastica_Exception_Response($response);
}
-
+
if ($errorNumber > 0) {
throw new Elastica_Exception_Client($errorNumber, $request, $response);
}
-
+
return $response;
}
}
View
0 lib/Elastica/Cluster.php 100644 → 100755
File mode changed.
View
56 lib/Elastica/Document.php 100644 → 100755
@@ -17,7 +17,7 @@ class Elastica_Document {
* @var array Document data
*/
protected $_data = array();
-
+
protected $_type = '';
protected $_index = '';
@@ -55,52 +55,52 @@ public function add($key, $value) {
/**
* Adds a file to the index
- *
+ *
* To use this feature you have to call the following command in the
* elasticsearch directory:
* <code>
* ./bin/plugin install mapper-attachments
* </code>
* This installs the tika file analysis plugin. More infos about supported formats
* can be found here: {@link http://tika.apache.org/0.7/formats.html}
- *
+ *
* @param string $key Key to add the file to
* @param string $filepath Path to add the file
*/
public function addFile($key, $filepath, $mimeType = '') {
- $value = base64_encode(file_get_contents($filepath));
-
- if (!empty($mimeType)) {
- $value = array(
- '_content_type' => $mimeType,
- '_name' => $filepath,
- 'content' => $value,
- );
- }
-
- $this->add($key, $value);
+ $value = base64_encode(file_get_contents($filepath));
+
+ if (!empty($mimeType)) {
+ $value = array(
+ '_content_type' => $mimeType,
+ '_name' => $filepath,
+ 'content' => $value,
+ );
+ }
+
+ $this->add($key, $value);
}
-
+
/**
* Adds a geopoint to the document
- *
+ *
* Geohashes re not yet supported
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/mapping/geo_point/
* @param string $key Field key
* @param float $latitude Latitud value
* @param float $longitude Longitude value
*/
public function addGeoPoint($key, $latitude, $longitude) {
-
+
$value = array(
'lat' => $latitude,
'lon' => $longitude,
);
-
+
$this->add($key, $value);
}
-
+
/**
* Overwrites the curent document data with the given data
*
@@ -118,29 +118,29 @@ public function setData(array $data) {
public function getData() {
return $this->_data;
}
-
+
public function setType($type) {
$this->_type = $type;
}
-
+
public function getType() {
$type = $this->_type;
-
+
if (empty($type)) {
- throw new Elastica_Exception('Type not set');
+ throw new Elastica_Exception_Invalid('Type not set');
}
return $type;
}
-
+
public function setIndex($index) {
$this->_index = $index;
}
-
+
public function getIndex() {
$index = $this->_index;
-
+
if (empty($index)) {
- throw new Elastica_Exception('Index not set');
+ throw new Elastica_Exception_Invalid('Index not set');
}
return $index;
}
View
10 lib/Elastica/Exception/Abstract.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * Abstract general Elastica exception object
+ *
+ * @category Xodoa
+ * @package Elastica
+ * @author Nicolas Ruflin <spam@ruflin.com>
+ */
+abstract class Elastica_Exception_Abstract extends Exception {
+}
View
2 lib/Elastica/Exception/Client.php 100644 → 100755
@@ -6,7 +6,7 @@
* @package Elastica
* @author Nicolas Ruflin <spam@ruflin.com>
*/
-class Elastica_Exception_Client extends Elastica_Exception {
+class Elastica_Exception_Client extends Elastica_Exception_Abstract {
protected $_error = 0;
protected $_request = null;
View
6 lib/Elastica/Exception.php → lib/Elastica/Exception/Invalid.php 100644 → 100755
@@ -1,11 +1,11 @@
<?php
/**
- * Elastica exception
+ * Invalid exception
*
* @category Xodoa
* @package Elastica
* @author Nicolas Ruflin <spam@ruflin.com>
*/
-class Elastica_Exception extends Exception
-{
+class Elastica_Exception_Invalid extends Elastica_Exception_Abstract {
+
}
View
13 lib/Elastica/Exception/NotImplemented.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Not implemented exception
+ *
+ * Is thrown if a function or feature is not implemented yet
+ *
+ * @category Xodoa
+ * @package Elastica
+ * @author Nicolas Ruflin <spam@ruflin.com>
+ */
+class Elastica_Exception_NotImplemented extends Elastica_Exception_Abstract {
+
+}
View
20 lib/Elastica/Exception/Response.php 100644 → 100755
@@ -6,16 +6,16 @@
* @package Elastica
* @author Nicolas Ruflin <spam@ruflin.com>
*/
-class Elastica_Exception_Response extends Elastica_Exception {
+class Elastica_Exception_Response extends Elastica_Exception_Abstract {
- protected $_response = null;
-
- public function __construct(Elastica_Response $response) {
- $this->_response = $response;
- parent::__construct($response->getError());
- }
+ protected $_response = null;
- public function getResponse() {
- return $this->_response;
- }
+ public function __construct(Elastica_Response $response) {
+ $this->_response = $response;
+ parent::__construct($response->getError());
+ }
+
+ public function getResponse() {
+ return $this->_response;
+ }
}
View
0 lib/Elastica/Field.php 100644 → 100755
File mode changed.
View
10 lib/Elastica/Filter.php 100644 → 100755
@@ -11,20 +11,20 @@ class Elastica_Filter
{
protected $_query;
protected $_filter;
-
- public function __construct(Elastica_Filter_Abstract $filter, Elastica_Query_Abstract $query) {
+
+ public function __construct(Elastica_Filter_Abstract $filter = null, Elastica_Query_Abstract $query = null) {
$this->_query = $query;
$this->_filter = $filter;
}
-
+
public function addFilter(Elastica_Filter_Abstract $filter) {
$this->_filter = $filter;
}
-
+
public function addQuery(Elastica_Query_Abstract $query) {
$this->_query = $query;
}
-
+
public function toArray() {
return array('filtered' => array(
'query' => $this->_query->toArray(),
View
0 lib/Elastica/Filter/Abstract.php 100644 → 100755
File mode changed.
View
30 lib/Elastica/Filter/Bool.php 100644 → 100755
@@ -11,59 +11,59 @@
class Elastica_Filter_Bool extends Elastica_Filter_Abstract
{
protected $_minimumNumberShouldMatch = 1;
-
+
protected $_must = array();
protected $_should = array();
protected $_mustNot = array();
-
+
public function addShould($args) {
$this->_addFilter('should', $args);
}
-
+
public function addMust($args) {
$this->_addFilter('must', $args);
}
-
+
public function addMustNot($args) {
$this->_addFilter('mustNot', $args);
}
-
+
public function _addFilter($type, $args) {
if ($args instanceof Elastica_Filter_Abstract) {
$args = $args->toArray();
}
-
+
if (!is_array($args)) {
- throw new Elastica_Exception('Invalid parameter. Has to be array or instance of Elastica_Filter');
+ throw new Elastica_Exception_Invalid('Invalid parameter. Has to be array or instance of Elastica_Filter');
}
-
+
$varName = '_' . $type;
$this->{$varName}[] = $args;
}
-
+
public function toArray() {
$args = array();
-
+
if (!empty($this->_must)) {
$args['must'] = $this->_must;
}
-
+
if (!empty($this->_should)) {
$args['should'] = $this->_should;
$args['minimum_number_should_match'] = $this->_minimumNumberShouldMatch;
}
-
+
if (!empty($this->_mustNot)) {
$args['must_not'] = $this->_mustNot;
}
-
+
return array('bool' => $args);
}
-
+
public function setBoost($boost) {
$this->_boost = $boost;
}
-
+
public function setMinimumNumberShouldMatch($minimumNumberShouldMatch) {
$this->_minimumNumberShouldMatch = intval($minimumNumberShouldMatch);
}
View
0 lib/Elastica/Filter/GeoBoundingBox.php 100644 → 100755
File mode changed.
View
0 lib/Elastica/Filter/GeoDistance.php 100644 → 100755
File mode changed.
View
23 lib/Elastica/Filter/Or.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Or Filter
+ *
+ * @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/query_dsl/or_filter/
+ * @uses Elastica_Filter_Abstract
+ * @category Xodoa
+ * @package Elastica
+ * @author Nicolas Ruflin <spam@ruflin.com>
+ */
+class Elastica_Filter_Or extends Elastica_Filter_Abstract
+{
+
+ protected $_queries = array();
+
+ public function addQuery(Elastica_Query_Abstract $query) {
+ $this->_queries[] = $query->toArray();
+ }
+
+ public function toArray() {
+ return array('or' => $this->_queries);
+ }
+}
View
0 lib/Elastica/Filter/Range.php 100644 → 100755
File mode changed.
View
26 lib/Elastica/Filter/Term.php 100644 → 100755
@@ -10,29 +10,29 @@
*/
class Elastica_Filter_Term extends Elastica_Filter_Abstract
{
- protected $_terms = array();
-
- public function __construct(array $terms = array()) {
- $this->setTerms($terms);
+ protected $_term = array();
+
+ public function __construct(array $term = array()) {
+ $this->setTerm($term);
}
-
- public function setTerms(array $terms) {
- $this->_terms = $terms;
+
+ public function setTerm(array $term) {
+ $this->_term = $term;
}
-
+
/**
* Adds a term to the term query
- *
+ *
* @param string $key Key to query
* @param string|array $value Values(s) for the query. Boost can be set with array
*/
public function addTerm($key, $value) {
- $this->_terms = array($key => $value);
+ $this->_term = array($key => $value);
}
-
+
public function toArray() {
- $args = $this->_terms;
-
+ $args = $this->_term;
+
return array('term' => $args);
}
}
View
0 lib/Elastica/Filter/Terms.php 100644 → 100755
File mode changed.
View
60 lib/Elastica/Index.php 100644 → 100755
@@ -1,7 +1,7 @@
<?php
/**
* Elastica index object
- *
+ *
* Handles reads, deletes and configurations of an index
*
* @category Xodoa
@@ -15,7 +15,7 @@ class Elastica_Index
* @var string Index name
*/
protected $_indexName = '';
-
+
/**
* @var Elastica_Client Client object
*/
@@ -30,16 +30,16 @@ class Elastica_Index
*/
public function __construct(Elastica_Client $client, $indexName) {
$this->_client = $client;
-
+
if (!is_string($indexName)) {
- throw new Elastica_Exception('Indexname should be of type string');
+ throw new Elastica_Exception_Invalid('Indexname should be of type string');
}
$this->_indexName = $indexName;
}
-
+
/**
* Returns a type object for the current index with the given name
- *
+ *
* @param string $type Type name
* @return Elastica_Type Type object
*/
@@ -49,44 +49,44 @@ public function getType($type) {
/**
* Returns the current status of the index
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/indices/status/
* @return array Index status
*/
public function getStatus() {
return $this->request('_status', Elastica_Request::GET);
}
-
+
/**
* Uses _bulk to send documents to the server
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/bulk/
* @param array $docs Array of Elastica_Document
*/
public function addDocuments(array $docs) {
foreach ($docs as $doc) {
$doc->setIndex($this->getIndexName());
}
-
+
return $this->getClient()->addDocuments($docs);
}
/**
* Deletes the index
- *
+ *
* @return <type>
*/
public function delete() {
- $response = $this->request('', Elastica_Request::DELETE);
-
+ $response = $this->request('', Elastica_Request::DELETE);
+
return $response;
}
-
+
/**
* Optimizes search index
- *
+ *
* Detailed arguments can be found here in the link
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/indices/optimize/
* @param array $args OPTIONAL Additional arguments
* @return array Server response
@@ -95,20 +95,20 @@ public function optimize($args = array()) {
// TODO: doesn't seem to work?
$this->request('_optimize', Elastica_Request::POST, $args);
}
-
+
/**
* Refreshs the index
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/indices/refresh/
* @return Elastica_Response Response object
*/
public function refresh() {
return $this->request('_refresh', Elastica_Request::POST, array());
- }
+ }
/**
* Creates a new index with the given arguments
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/indices/create_index/
* @param array $args OPTIONAL Arguments to use
* @param bool $recreate OPTIONAL Deletes index first if already exists (default = false)
@@ -119,12 +119,12 @@ public function create(array $args = array(), $recreate = false) {
try {
$this->delete();
} catch(Elastica_Exception_Response $e) {
- // Table can't be deleted, because doesn't exist
+ // Table can't be deleted, because doesn't exist
}
}
return $this->request('', Elastica_Request::PUT, $args);
}
-
+
public function search($query) {
// TODO: implement
if ($query instanceof Elastica_Query) {
@@ -136,10 +136,10 @@ public function search($query) {
} else if (is_string($query)) {
// Assumes is string query
$queryObject = new Elastica_Query(new Elastica_Query_QueryString($query));
- $query = $queryObject->toArray();
+ $query = $queryObject->toArray();
} else {
// TODO: Implement queries without
- throw new Elastica_Exception('Not implemented yet');
+ throw new Elastica_Exception_NotImplemented();
}
$path = '_search';
@@ -148,16 +148,16 @@ public function search($query) {
return new Elastica_ResultSet($response);
}
-
+
/**
* Returns the index name
- *
+ *
* @return string Index name
*/
public function getIndexName() {
return $this->_indexName;
}
-
+
/**
* Returns index client
*
@@ -166,17 +166,17 @@ public function getIndexName() {
public function getClient() {
return $this->_client;
}
-
+
/**
* Makes calls to the elasticsearch server based on this index
- *
+ *
* @param string $path Path to call
* @param string $method Rest method to use (GET, POST, DELETE, PUT)
* @param array $data OPTIONAL Arguments as array
* @return Elastica_Response Response object
*/
public function request($path, $method, $data = array()) {
- $path = $this->getIndexName() . '/' . $path;
+ $path = $this->getIndexName() . '/' . $path;
return $this->getClient()->request($path, $method, $data);
}
}
View
88 lib/Elastica/Query.php 100644 → 100755
@@ -1,7 +1,7 @@
<?php
/**
* Elastica query object
- *
+ *
* Creates different types of queries
*
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/search/
@@ -15,7 +15,7 @@ class Elastica_Query
const RANGE = 'range';
const WILDCARD = 'wildcard';
const QUERY_STRING = 'query_string';
-
+
protected $_rawArguments = array();
protected $_from = 0;
protected $_limit = 10;
@@ -25,10 +25,10 @@ class Elastica_Query
protected $_scriptFields = array();
protected $_query = array();
protected $_filters = array();
-
+
/**
* Creates a query object
- *
+ *
* @param array|Elastica_Query_Abstract $query OPTIONAL Query object (default = null)
*/
public function __construct($query = null) {
@@ -38,52 +38,52 @@ public function __construct($query = null) {
$this->setQuery($query);
}
}
-
+
/**
* Adds query as raw array
- *
+ *
* @param array $query Query array
* @return Elastica_Query Query object
*/
public function setRawQuery(array $query) {
$this->_query = $query;
return $this;
}
-
+
/**
* Sets the query
- *
+ *
* @param Elastica_Query_Abstract $query Query object
* @return Elastica_Query Query object
*/
public function setQuery(Elastica_Query_Abstract $query) {
$this->_query = $query->toArray();
return $this;
}
-
+
/**
* @deprecated Use setQuery
*/
public function addQuery(Elastica_Query_Abstract $query) {
trigger_error('addQuery is deprecated. Use setQuery instead');
$this->setQuery($query);
}
-
+
public function addFilter(Elastica_Filter $filter) {
$this->_filters = $filter->toArray();
return $this;
}
-
-
+
+
public function setFrom($from) {
$this->_from = $from;
return $this;
}
-
+
/**
* Sets sort arguments for the query
* Replaces existing values
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/search/sort/
* @param array $sortArgs Sorting arguments
* @return Elastica_Query Query object
@@ -92,10 +92,10 @@ public function setSort(array $sortArgs) {
$this->_sortArgs = $sortArgs;
return $this;
}
-
+
/**
* Adds a sort param to the query
- *
+ *
* @todo Test
* @param mixed $sort Sort parameter
* @return Elastica_Query Query object
@@ -107,7 +107,7 @@ public function addSort($sort) {
/**
* Sets highlight arguments for the query
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/search/highlighting/
* @param array $highlightArgs Set all highlight arguments
* @return Elastica_Query Query object
@@ -116,10 +116,10 @@ public function setHighlight(array $highlightArgs) {
$this->_highlightArgs = $highlightArgs;
return $this;
}
-
+
/**
* Adds a highlight argument
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/search/highlighting/
* @param mixed $highlightArg Add highlight argument
* @return Elastica_Query Query object
@@ -128,120 +128,120 @@ public function addHighlight($highlight) {
$this->_highlightArgs[] = $highlight;
return $this;
}
-
+
/**
* Alias for setLimit
- *
+ *
* @param int $limit OPTIONAL Maximal number of results for query (default = 10)
* @return Elastica_Query Query object
*/
public function setSize($limit = 10) {
return $this->setLimit($limit);
return $this;
}
-
+
/**
* Sets maximum number of results for this query
- *
+ *
* @param int $limit OPTIONAL Maximal number of results for query (default = 10)
* @return Elastica_Query Query object
*/
public function setLimit($limit = 10) {
$this->_limit = $limit;
return $this;
}
-
+
/**
* Enables explain on the query
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/search/explain/
* @param bool $explain OPTIONAL Enabled or disable explain (default = true)
*/
public function setExplain($explain = true) {
$this->_explain = $explain;
return $this;
}
-
+
/**
* Sets the fields to be returned by the search
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/search/fields/
* @param array $fields Fields to be returne
*/
public function setFields(array $fields) {
$this->_fields = $fields;
return $this;
}
-
+
/**
* Set script fields
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/search/script_fields/
* @param array $scriptFields Script fields
*/
public function setScriptFields(array $scriptFields) {
$this->_scriptFields = $scriptFields;
return $this;
}
-
+
/**
* Allows to set raw arguments that can't be set over the
* provided method. Field name has also to be set in given array.
* Values set here are overrided by values set
* over the specific methods
- *
+ *
* @param array $args Argument array
*/
public function setRawArguments(array $args) {
$this->_rawArgumens = $args;
return $this;
}
-
+
/**
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/search/facets
*/
public function setFacets(array $args) {
throw new Elastica_Exception('not implemented yet');
return $this;
}
-
+
public function toArray() {
-
+
$query = $this->_rawArguments;
$query['query'] = $this->_query;
-
+
if (!empty($this->_limit)) {
$query['size'] = $this->_limit;
}
-
+
$query['from'] = $this->_from;
-
+
if (!empty($this->_sortArgs)) {
$query['sort'] = $this->_sortArgs;
}
-
+
if (!empty($this->_highlightArgs)) {
$query['highlight'] = $this->_highlightArgs;
}
-
+
if ($this->_explain) {
$query['explain'] = $this->_explain;
}
-
+
if (!empty($this->_fields)) {
$query['fields'] = $this->_fields;
}
-
+
if (!empty($this->_scriptFields)) {
$query['script_fields'] = $this->_scriptFields;
}
-
+
if (!empty($this->_filters)) {
// TODO: should query really be overwritten?
- $query['query'] = $this->_filters;
+ $query['query'] = $this->_filters;
}
-
+
return $query;
}
}
View
0 lib/Elastica/Query/Abstract.php 100644 → 100755
File mode changed.
View
0 lib/Elastica/Query/Array.php 100644 → 100755
File mode changed.
View
32 lib/Elastica/Query/Bool.php 100644 → 100755
@@ -12,61 +12,61 @@ class Elastica_Query_Bool extends Elastica_Query_Abstract
{
protected $_boost = 1.0;
protected $_minimumNumberShouldMatch = 1;
-
+
protected $_must = array();
protected $_should = array();
protected $_mustNot = array();
-
+
public function addShould($args) {
$this->_addQuery('should', $args);
}
-
+
public function addMust($args) {
$this->_addQuery('must', $args);
}
-
+
public function addMustNot($args) {
$this->_addQuery('mustNot', $args);
}
-
+
public function _addQuery($type, $args) {
if ($args instanceof Elastica_Query_Abstract) {
$args = $args->toArray();
}
-
+
if (!is_array($args)) {
- throw new Elastica_Exception('Invalid parameter. Has to be array or instance of Elastica_Query');
+ throw new Elastica_Exception_Invalid('Invalid parameter. Has to be array or instance of Elastica_Query');
}
-
+
$varName = '_' . $type;
$this->{$varName}[] = $args;
}
-
+
public function toArray() {
$args = array();
-
+
if (!empty($this->_must)) {
$args['must'] = $this->_must;
}
-
+
if (!empty($this->_should)) {
$args['should'] = $this->_should;
$args['minimum_number_should_match'] = $this->_minimumNumberShouldMatch;
}
-
+
if (!empty($this->_mustNot)) {
$args['must_not'] = $this->_mustNot;
}
-
+
$args['boost'] = $this->_boost;
-
+
return array('bool' => $args);
}
-
+
public function setBoost($boost) {
$this->_boost = $boost;
}
-
+
public function setMinimumNumberShouldMatch($minimumNumberShouldMatch) {
$this->_minimumNumberShouldMatch = intval($minimumNumberShouldMatch);
}
View
0 lib/Elastica/Query/Field.php 100644 → 100755
File mode changed.
View
0 lib/Elastica/Query/Fuzzy.php 100644 → 100755
File mode changed.
View
0 lib/Elastica/Query/MatchAll.php 100644 → 100755
File mode changed.
View
60 lib/Elastica/Query/QueryString.php 100644 → 100755
@@ -12,48 +12,72 @@ class Elastica_Query_QueryString extends Elastica_Query_Abstract
{
protected $_queryString = '';
protected $_defaultOperator = '';
-
- public function __construct($queryString) {
+
+ /**
+ * Creates query string object. Calls setQuery with argument
+ *
+ * @param string $queryString OPTIONAL Query string for object
+ */
+ public function __construct($queryString = '') {
$this->setQueryString($queryString);
}
-
+
+ /**
+ * Sets a new query string for the object
+ *
+ * @param string Query string
+ * @return Elastica_Query_QueryString Current object
+ */
public function setQueryString($queryString) {
if (!is_string($queryString)) {
- throw new Elastica_Exception('Parameter has to be a string');
+ throw new Elastica_Exception_Invalid('Parameter has to be a string');
}
-
+
$this->_queryString = $queryString;
+ return $this;
}
-
- public function setDefaultOperator($operator)
- {
+
+ /**
+ * Sets the default operator AND or OR
+ *
+ * If no operator is set, OR is chosen
+ *
+ * @param string $operator Operator
+ * @return Elastica_Query_QueryString Current object
+ */
+ public function setDefaultOperator($operator) {
$this->_defaultOperator = $operator;
+ return $this;
}
-
- public function toArray() {
+
+ /**
+ * Converts the query string object to an array
+ *
+ * @return array Query string array
+ */
+ public function toArray() {
$args['query'] = $this->_queryString;
-
- if(!empty($this->_defaultOperator))
- {
+
+ if(!empty($this->_defaultOperator)) {
$args['default_operator'] = $this->_defaultOperator;
}
-
+
return array('query_string' => $args);
}
-
+
/**
* Escapes the following characters (because part of the query language)
* + - && || ! ( ) { } [ ] ^ " ~ * ? : \
- *
+ *
* @link http://lucene.apache.org/java/2_4_0/queryparsersyntax.html#Escaping%20Special%20Characters
* @param string $term Query term to escape
* @return string Escaped query term
*/
public static function escapeTerm($term) {
-
+
// \ escaping has to be first, otherwise escaped later once again
$chars = array('\\', '+', '-', '&&', '||', '!', '(', ')', '{', '}', '[', ']', '^', '"', '~', '*', '?', ':');
-
+
foreach ($chars as $char) {
$term = str_replace($char, '\\' . $char, $term);
}
View
0 lib/Elastica/Query/Range.php 100644 → 100755
File mode changed.
View
49 lib/Elastica/Query/Term.php 100644 → 100755
@@ -10,29 +10,50 @@
*/
class Elastica_Query_Term extends Elastica_Query_Abstract
{
- protected $_terms = array();
-
- public function __construct(array $terms = array()) {
- $this->setTerms($terms);
+ protected $_term = array();
+
+ /**
+ * Constructs the Term query object
+ *
+ * @param array $term OPTIONAL Calls setTerm with the given $term array
+ */
+ public function __construct(array $term = array()) {
+ $this->setTerm($term);
}
-
- public function setTerms(array $terms) {
- $this->_terms = $terms;
+
+ /**
+ * Set term can be used instead of addTerm if some more special
+ * values for a term have to be set.
+ *
+ * @param array $term Term array
+ * @return Elastica_Query_Term Current object
+ */
+ public function setTerm(array $term) {
+ $this->_term = $term;
+ return $this;
}
-
+
/**
* Adds a term to the term query
- *
+ *
* @param string $key Key to query
* @param string|array $value Values(s) for the query. Boost can be set with array
+ * @param float $boost OPTIONAL Boost value (default = 1.0)
+ * @return Elastica_Query_Term Current object
*/
- public function addTerm($key, $value) {
- $this->_terms[] = array($key => $value);
+ public function addTerm($key, $value, $boost = 1.0) {
+ // TODO: Why is return $this->setTerm(array($key => array('value' => $value, 'boost' => $boost)));
+ // not working? Tested with filer
+ return $this->setTerm(array($key => $value));
}
-
+
+ /**
+ * Converts the term query to an array
+ *
+ * @return array Array term query
+ */
public function toArray() {
- $args = $this->_terms;
-
+ $args = $this->_term;
return array('term' => $args);
}
}
View
39 lib/Elastica/Query/Terms.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Terms query
+ *
+ * @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/query_dsl/terms_query/
+ * @uses Elastica_Query_Abstract
+ * @category Xodoa
+ * @package Elastica
+ * @author Nicolas Ruflin <spam@ruflin.com>
+ */
+class Elastica_Query_Terms extends Elastica_Query_Abstract
+{
+ protected $_terms = array();
+
+ public function __construct(array $terms = array()) {
+ $this->setTerms($terms);
+ }
+
+ public function setTerms(array $terms) {
+ $this->_terms = $terms;
+ }
+
+ /**
+ * Adds a term to the term query
+ *
+ * @param string $key Key to query
+ * @param string|array $value Values(s) for the query. Boost can be set with array
+ */
+ public function addTerm($key, $value) {
+ $this->_terms[] = array($key => $value);
+ }
+
+ public function setMinimumMatch() {
+ }
+
+ public function toArray() {
+ throw new Elastica_Exception_NotImplemented();
+ }
+}
View
0 lib/Elastica/Query/Wildcard.php 100644 → 100755
File mode changed.
View
0 lib/Elastica/Request.php 100644 → 100755
File mode changed.
View
0 lib/Elastica/Response.php 100644 → 100755
File mode changed.
View
0 lib/Elastica/Result.php 100644 → 100755
File mode changed.
View
0 lib/Elastica/ResultSet.php 100644 → 100755
File mode changed.
View
66 lib/Elastica/Type.php 100644 → 100755
@@ -1,11 +1,11 @@
<?php
/**
* Elastica type object
- *
+ *
* elasticsearch has for every types as a substructure. This object
* represents a type inside a context
* The hirarchie is as following: client -> index -> type -> document
- *
+ *
* Search over different indices and types is not supported yet {@link http://www.elasticsearch.com/docs/elasticsearch/rest_api/search/indices_types/}
*
* @category Xodoa
@@ -19,15 +19,15 @@ class Elastica_Type
* @var Elastica_Index Index object
*/
protected $_index = null;
-
+
/**
* @var string Object type
*/
protected $_type = '';
/**
* Creates a new type object inside the given index
- *
+ *
* @param Elastica_Index $index Index Object
* @param string $type Type name
*/
@@ -38,18 +38,18 @@ public function __construct(Elastica_Index $index, $type) {
/**
* Adds the given document to the search index
- *
+ *
* @param Elastica_Document $doc Document with data
- * @return Elastica_Response
+ * @return Elastica_Response
*/
public function addDocument(Elastica_Document $doc) {
$path = $doc->getId();
return $this->request($path, Elastica_Request::PUT, $doc->getData());
}
-
+
/**
* Uses _bulk to send documents to the server
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/bulk/
* @param array $docs Array of Elastica_Document
*/
@@ -58,13 +58,13 @@ public function addDocuments(array $docs) {
foreach($docs as $doc) {
$doc->setType($this->getType());
}
-
+
return $this->getIndex()->addDocuments($docs);
}
-
+
/**
* Returns the type name
- *
+ *
* @return string Type
*/
public function getType() {
@@ -86,35 +86,35 @@ public function getCount() {
/**
* Sets value type mapping for this type
- *
+ *
* @param array $properties Property array with all mappings
*/
public function setMapping(array $properties, $source = true) {
$path = '_mapping';
-
+
$data = array($this->getType() => array('properties' => $properties, '_source' => array('enabled' => $source)));
return $this->request($path, Elastica_Request::PUT, $data);
}
-
+
/**
* Returns current mapping for the given type
- *
+ *
* @return array Current mapping
*/
public function getMapping() {
$path = '_mapping';
-
+
$response = $this->request($path, Elastica_Request::GET);
- return $response->getResponse();
+ return $response->getResponse();
}
-
+
/**
* Example code
- *
+ *
* TODO: Improve sample code
* {
- * "from" : 0,
+ * "from" : 0,
* "size" : 10,
* "sort" : {
* "postDate" : {"reverse" : true},
@@ -125,12 +125,12 @@ public function getMapping() {
* "term" : { "user" : "kimchy" }
* }
* }
- *
+ *
* @param array|Elastica_Query Array with all querie data inside or a Elastica_Query object
* @return Elastica_ResultSet ResultSet with all results inside
*/
public function search($query) {
-
+
if ($query instanceof Elastica_Query) {
$query = $query->toArray();
} else if ($query instanceof Elastica_Query_Abstract) {
@@ -140,12 +140,12 @@ public function search($query) {
} else if (is_string($query)) {
// Assumes is string query
$queryObject = new Elastica_Query(new Elastica_Query_QueryString($query));
- $query = $queryObject->toArray();
+ $query = $queryObject->toArray();
} else {
// TODO: Implement queries without
- throw new Elastica_Exception('Not implemented yet');
+ throw new Elastica_Exception_NotImplemented();
}
-
+
$path = '_search';
$response = $this->request($path, Elastica_Request::GET, $query);
@@ -160,23 +160,23 @@ public function search($query) {
public function getIndex() {
return $this->_index;
}
-
+
/**
* Deletes entries in the db based on a query
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/delete_by_query/
* @param Elastica_Query $query
*/
public function deleteByQuery(Elastica_Query $query) {
// TODO: To be implemented, can also be implemented on index and client level (see docs)
- throw new Elastica_Exception('Not implemented yet');
+ throw new Elastica_Exception_NotImplemented();
}
-
+
/**
* More like this query based on the given object
- *
+ *
* The id in the given object has to be set
- *
+ *
* @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/more_like_this/
* @param EalsticSearch_Document $doc Document to query for similar objects
* @param array $args OPTIONAL Additional arguments for the query
@@ -186,10 +186,10 @@ public function moreLikeThis(Elastica_Document $doc, $args = array()) {
$path = $doc->getId() . '/_mlt';
return $this->request($path, Elastica_Request::GET, $args);
}
-
+
/**
* Makes calls to the elasticsearch server based on this type
- *
+ *
* @param string $path Path to call
* @param string $method Rest method to use (GET, POST, DELETE, PUT)
* @param array $data OPTIONAL Arguments as array
View
46 lib/Elastica/Type/Abstract.php 100644 → 100755
@@ -1,18 +1,18 @@
<?php
/**
* Abstract helper class to implement search indexes based on models.
- *
- * This abstract model should help creating search index and a subtype
+ *
+ * This abstract model should help creating search index and a subtype
* with some easy config entries that are overloaded.
- *
+ *
* The following variables have to be set:
* - $_indexName
* - $_typeName
- *
+ *
* The following variables can be set for additional configuration
* - $_mapping: Value type mapping for the given type
* - $_indexParams: Parameters for the index
- *
+ *
* @todo Add some settings examples to code
* @category Xodoa
* @package Elastica
@@ -21,7 +21,7 @@
abstract class Elastica_Type_Abstract
{
const MAX_DOCS_PER_REQUEST = 1000;
-
+
protected $_indexName = '';
protected $_typeName = '';
protected $_client = null;
@@ -30,72 +30,72 @@
protected $_mapping = array();
protected $_indexParams = array();
protected $_source = true;
-
+
/**
* Creates index object with client connection
- *
+ *
* Reads index and type name from protected vars _indexName and _typeName.
* Has to be set in child class
*/
public function __construct(Elastica_Client $client = null) {
if (!$client) {
$client = new Elastica_Client();
}
-
+
if (empty($this->_indexName)) {
- throw new Elastica_Elastica_Exception('Index name has to be set');
+ throw new Elastica_Exception_Invalid('Index name has to be set');
}
-
+
if (empty($this->_typeName)) {
- throw new Elastica_Elastica_Exception('Type name has to be set');
+ throw new Elastica_Exception_Invalid('Type name has to be set');
}
-
+
$this->_client = $client;
$this->_index = new Elastica_Index($this->_client, $this->_indexName);
$this->_type = new Elastica_Type($this->_index, $this->_typeName);
}
-
+
/**
* Creates the index and sets the mapping for this type
- *
+ *
* @param bool $recreate OPTIONAL Recreates the index if true (default = false)
*/
public function create($recreate = false) {
$this->getIndex()->create($this->_indexParams, $recreate);
$this->getType()->setMapping($this->_mapping, $this->_source);
}
-
+
/**
* Searchs in the current index
- *
+ *
* @param $query array|Elastica_Query Query params
* @return Elastica_ResultSet Result set
*/
public function search($query) {
return $this->getType()->search($query);
}
-
+
/**
* Returns the search index
- *
+ *
* @return Elastica_Index Index object
*/
public function getIndex() {
return $this->_index;
}
-
+
/**
* Returns type object
- *
+ *
* @return Elastica_Type Type object
*/
public function getType() {
return $this->_type;
}
-
+
/**
* Converts given time to format: 1995-12-31T23:59:59Z
- *
+ *
* This is the lucene date format
*
* @param int $date Date input (could be string etc.) -> must be supported by strtotime
View
0 test/CodeSniffer/Standards/Xodoa/Sniffs/Commenting/ClassCommentSniff.php 100644 → 100755
File mode changed.
View
0 test/CodeSniffer/Standards/Xodoa/Sniffs/Commenting/FileCommentSniff.php 100644 → 100755
File mode changed.
View
0 test/CodeSniffer/Standards/Xodoa/Sniffs/Commenting/FunctionCommentSniff.php 100644 → 100755
File mode changed.
View
0 test/CodeSniffer/Standards/Xodoa/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php 100644 → 100755
File mode changed.
View
0 test/CodeSniffer/Standards/Xodoa/Sniffs/WhiteSpace/ScopeIndentSniff.php 100644 → 100755
File mode changed.
View
0 test/CodeSniffer/Standards/Xodoa/XodoaCodingStandard.php 100644 → 100755
File mode changed.
View
0 test/CodeSniffer/Standards/Xodoa/ruleset.xml 100644 → 100755
File mode changed.
View
0 test/bootstrap.php 100644 → 100755
File mode changed.
View
0 test/data/test.doc 100644 → 100755
File mode changed.
View
0 test/data/test.docx 100644 → 100755
File mode changed.
View
0 test/data/test.pdf 100644 → 100755
File mode changed.
View
0 test/data/test.txt 100644 → 100755
File mode changed.
View
2 test/lib/Elastica/ClientTest.php 100644 → 100755
@@ -54,7 +54,7 @@ public function testAddDocumentsEmpty() {
try {
$client->addDocuments(array());
$this->fail('Should throw exception');
- } catch(Elastica_Exception $e) {
+ } catch(Elastica_Exception_Invalid $e) {
$this->assertTrue(true);
}
}
View
0 test/lib/Elastica/ExampleTest.php 100644 → 100755
File mode changed.
View
0 test/lib/Elastica/Filter/GeoDistanceTest.php 100644 → 100755
File mode changed.
View
0 test/lib/Elastica/IndexTest.php 100644 → 100755
File mode changed.
View
0 test/lib/Elastica/Query/BoolTest.php 100644 → 100755
File mode changed.
View
0 test/lib/Elastica/Query/QueryStringTest.php 100644 → 100755
File mode changed.
View
0 test/lib/Elastica/ResultTest.php 100644 → 100755
File mode changed.
View
0 test/lib/Elastica/TypeTest.php 100644 → 100755
File mode changed.
View
0 test/phpunit.xml.dist 100644 → 100755
File mode changed.

0 comments on commit b84e2f2

Please sign in to comment.