MaximeChaillou / elasticsearch-codeigniter-library

A small library to make search queries and create and add indexes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

elasticsearch-codeigniter-library

A small library to make search queries and create and add indexes.

How to index data with the library

You create data in an array to pass it to elasticsearch. You probably want to specify the Key for the document and show the result. Like this:

$id = 1337;
$data = array("name"=>"nisse", "age"=>"14", "sex"=>"male");
var_dump($this->elasticsearch->add("people", $id, $data));

This will save the array to the elasticsearch. "people" is the collection, the index where you want to save it.

About

A small library to make search queries and create and add indexes.

License:MIT License


Languages

Language:PHP 100.0%