-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathServiceInterface.php
72 lines (62 loc) · 1.38 KB
/
ServiceInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
namespace Snowcap\ElasticaBundle;
use Snowcap\ElasticaBundle\Indexer\IndexerInterface;
/**
* Interface ServiceInterface
*
* @package Snowcap\ElasticaBundle
*/
interface ServiceInterface
{
/**
* Create indexes as defined in the config
*
*/
public function createIndexes();
/**
* Reindex all indexable content
*
*/
public function reindex();
/**
* Index the provided entity (or unindex it if its indexer asks us too)
*
* @param object $entity
*/
public function index($entity);
/**
* Unindex the provided entity
*
* @param object $entity
* @return mixed
*/
public function indexRemove($entity);
/**
* Perform a simple search on the given index and types
*
* @param string $query
* @param string|array $index
* @param array $types
* @return \Elastica\ResultSet
*/
public function search($query, $index, $types = null);
/**
* Register an index
*
* @param string $alias
* @param Indexer\IndexerInterface $indexer
*/
public function registerIndexer($alias, IndexerInterface $indexer);
/**
* Return all indexers
*
* @return array
*/
public function getIndexers();
/**
* Set indexes
*
* @param array $indexes
*/
public function setIndexes(array $indexes);
}