see613

elastic_base

Jun 2nd, 2014
529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Elastic;
  4. use Elastica;
  5.  
  6.  
  7. class Base {
  8.     const INDEX_ANALYZER = 'indexAnalyzer';
  9.     const SEARCH_STRICT_ANALYZER = 'strictSearchAnalyzer';
  10.     const SEARCH_ANALYZER = 'searchAnalyzer';
  11.  
  12.     protected $client;
  13.     protected $index;
  14.     protected $type;
  15.  
  16.  
  17.     function __construct()
  18.     {
  19.  
  20.     }
  21.  
  22.     function initServer($host, $port, $indexName, $typeName) {
  23.         $this->client = new Elastica\Client(array(
  24.             'host' => $host,
  25.             'port' => $port
  26.         ));
  27.     }
  28.  
  29.  
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment