Symbiote\Elastica\ElasticaService
A service used to interact with elastic search.
Synopsis
class ElasticaService
{
- // members
- public array $mappings = ;
- protected array $buffer = ;
- protected bool $buffered = false;
- private Client $client;
- private $index;
- public boolean $enabled = true;
- protected boolean $connected = true;
- // methods
- public void __construct()
- public Client getClient()
- public Index getIndex()
- public ResultList search()
- public void index()
- public void indexDocument()
- public void startBulkIndex()
- public void endBulkIndex()
- public void remove()
- public void define()
- protected void createMappings()
- public void refresh()
- public array getIndexedClasses()
Members
private
- $client — Symbiote\Elastica\Elastica\Client
- $index — string
protected
- $buffer — array
- $buffered — Symbiote\Elastica\bool
- $connected
public
- $enabled
- $mappings
—
array
Custom mapping definitions
Methods
protected
- createMappings() — Define all known mappings
public
- __construct()
- define() — Creates the index and the type mappings.
- endBulkIndex() — Ends the current bulk index operation and indexes the buffered documents.
- getClient()
- getIndex()
- getIndexedClasses() — Gets the classes which are indexed (i.e. have the extension applied).
- index() — Either creates or updates a record in the index.
- indexDocument()
- refresh() — Re-indexes each record in the index.
- remove() — Deletes a record from the index.
- search() — Performs a search query and returns a result list.
- startBulkIndex() — Begins a bulk indexing operation where documents are buffered rather than indexed immediately.