forked from floriansemm/SolrBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSolrInterface.php
53 lines (44 loc) · 1.04 KB
/
SolrInterface.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
<?php
namespace FS\SolrBundle;
use FS\SolrBundle\Query\AbstractQuery;
use FS\SolrBundle\Repository\Repository;
interface SolrInterface
{
/**
* @param object $entity
*/
public function removeDocument($entity);
/**
* @param object $entity
*
* @return bool
*/
public function addDocument($entity);
/**
* @param AbstractQuery $query
*
* @return array of found documents
*/
public function query(AbstractQuery $query);
/**
* @param object $entity
*
* @return bool
*/
public function updateDocument($entity);
/**
* @param string $entityAlias
*
* @return Repository
*
* @throws \RuntimeException if repository of the given $entityAlias does not extend FS\SolrBundle\Repository\Repository
*/
public function getRepository($entityAlias);
/**
* @param array $doctrineChangeSet
* @param object $entity
*
* @return array
*/
public function computeChangeSet(array $doctrineChangeSet, $entity);
}