prabhat2k15/elasticsearch

This package is abandoned and no longer maintained. No replacement package was suggested.

This service is for UI Integration

Installs: 419

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

pkg:composer/prabhat2k15/elasticsearch

This package has no released version yet, and little information is available.


README

Elastic Search for UI Integration

##how to Integrate

  1. include search service use service\SearchService;
  2. Create SearchService Object $ss=new SearchService($host);//$host is the url where you want to hit the search
  3. Call search($searchkey) method with your search query as parameter
  4. Save the response and use it accordingly.

##sample Implementation

require_once "vendor/autoload.php";

use service\SearchService;

if (isset($_GET['query'])) {

$host="www.example.com";
$s=new SearchService($host);
$res = $s->search($_GET['query']);
print_r($res);

}

to search the product by ID

$s=new SearchService();
$res = $s->searchById($id);
print_r($res);

To search product by multiple ids, pass the array of ids

$ids = array('0' => 2,'1'=>3,'2'=>4 );
$s=new SearchService();
$res = $s->searchByIds($ids);
print_r($res);

--- for line

heading 1

heading 2

heading3

  • ul1
  • ul2
    • sub ul1
    • sub ul2
  1. ol1
  2. ol2
for code priview
function sum(){
	return a+b;
}

this is highlighted text