diff --git a/upload/plugins/cb_elastic_search/admin/configure.html b/upload/plugins/cb_elastic_search/admin/configure.html new file mode 100755 index 00000000..0755d64d --- /dev/null +++ b/upload/plugins/cb_elastic_search/admin/configure.html @@ -0,0 +1,110 @@ +ElasticSearch +
+
+

Configurations

+
+
+
+
+
+ + +

e.g the URL on which elastic server is listening

+
+ +
+ +
+
+ {if is_es_server_running()} + Elastic Server is running Up ! + + + {else} + Elastic Server not running or configured ! + + + {/if} +
+
+
+
+
+
+
+
+
+
+
+
+

Documentation

+
+
+

Information About Plugin

+
    +
  • Last update: Jan, 2019
  • +
  • Authors:Fahad abbas
  • +
  • Author Website: http://clipbucket.com
  • +
  • Version: 1.0
  • +
  • ClipBucket Version: 4.2.x
  • +
+
+
+

Why You Need Elastic Search module?

+

To simply make website search more efficient for users. A full text search Engine which will make clipbucket's Search Experience a way better !

+
+
+ Note : To Run this plugin make sure your elastic server is running up ! +
+ +
+
+

Indexer

+
Elastic Search Indexer helps you Index your Videos,Channels and Photos with Elastic Search Server.
+

Request

+
Update,Select,Delete,Add This menu lets you select the request type for Mapping and Indexing. `Update` is used to add and update both.
+

Type

+
This menu lets you decide wheather Map or Index, Note : Indexing is always done after Mapping.  
+

Offset

+
It is used to specify the offset of the first row to be returned.
+

Count

+
It is used to specify the maximum number of rows to be returned. 
+

Id

+
To Index Specific Id , it will ignore Offset and Count Parameter and it is only used while indexing.
+

Mode

+
This lets you decide between Videos,Channels and Photos.   
+               
+
+
+
+
+
+ + + + + diff --git a/upload/plugins/cb_elastic_search/admin/configure.php b/upload/plugins/cb_elastic_search/admin/configure.php new file mode 100755 index 00000000..098f100e --- /dev/null +++ b/upload/plugins/cb_elastic_search/admin/configure.php @@ -0,0 +1,29 @@ +Set_Website_Details($field,$value); + } +} + +$template = 'configure.html'; +template_files($template,CB_ES_ADMIN_DIR); + +?> \ No newline at end of file diff --git a/upload/plugins/cb_elastic_search/admin/index_data.html b/upload/plugins/cb_elastic_search/admin/index_data.html index fe4ee177..1ba332e6 100755 --- a/upload/plugins/cb_elastic_search/admin/index_data.html +++ b/upload/plugins/cb_elastic_search/admin/index_data.html @@ -16,10 +16,10 @@
diff --git a/upload/plugins/cb_elastic_search/elasticSearch.php b/upload/plugins/cb_elastic_search/elasticSearch.php index ca39e8bf..85ee1e95 100755 --- a/upload/plugins/cb_elastic_search/elasticSearch.php +++ b/upload/plugins/cb_elastic_search/elasticSearch.php @@ -268,8 +268,7 @@ class ElasticSearch function __construct($index=false) { - $this->apiUrl = $_SERVER["REQUEST_SCHEME"]."://".config('elastic_server_ip').":9200"; - + $this->apiUrl = config('elastic_server_ip'); $this->index = $index; } diff --git a/upload/plugins/cb_elastic_search/elastic_search.php b/upload/plugins/cb_elastic_search/elastic_search.php index 6e46bea1..7f806e27 100755 --- a/upload/plugins/cb_elastic_search/elastic_search.php +++ b/upload/plugins/cb_elastic_search/elastic_search.php @@ -38,12 +38,25 @@ assign('cb_es_installed',CB_ES_INSTALLED); $Cbucket->links['search_result'] = array('module.php','module.php'); +//fields required for search form function elastic_mode_search() { echo ''; echo ''; } +/*ini_set('display_errors', '-1'); +error_reporting(E_ALL);*/ +function is_es_server_running(){ + return checkRemoteFile(config('elastic_server_ip')); +} + +/*if (is_es_server_running()){ + exit("YES"); +}else{ + exit("NO"); +}*/ + //Elastic Search Class include "elasticSearch.php"; @@ -52,3 +65,4 @@ register_anchor_function("elastic_mode_search","elastic_mode_search"); register_module('elastic_search',CB_ES_DIR.'/search.php'); add_admin_menu("Elastic Search","ES Indexer",'index_data.php',CB_ES.'/admin'); +add_admin_menu("Elastic Search","Configure",'configure.php',CB_ES.'/admin'); \ No newline at end of file diff --git a/upload/plugins/cb_elastic_search/install_elastic_search.php b/upload/plugins/cb_elastic_search/install_elastic_search.php index 06a87632..e2dd758f 100755 --- a/upload/plugins/cb_elastic_search/install_elastic_search.php +++ b/upload/plugins/cb_elastic_search/install_elastic_search.php @@ -2,6 +2,6 @@ $db->Execute("INSERT INTO ".tbl('config')." (`configid`, `name`, `value`) VALUES -(1, 'elastic_server_ip', 'localhost');"); +(NULL, 'elastic_server_ip', 'localhost');"); ?> \ No newline at end of file diff --git a/upload/plugins/cb_elastic_search/test.html b/upload/plugins/cb_elastic_search/test.html old mode 100644 new mode 100755