-
Notifications
You must be signed in to change notification settings - Fork 73
/
SolrInterface.php
56 lines (47 loc) · 1.38 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
54
55
56
<?php
namespace FS\SolrBundle;
use FS\SolrBundle\Query\AbstractQuery;
use FS\SolrBundle\Query\QueryBuilderInterface;
use FS\SolrBundle\Repository\Repository;
use FS\SolrBundle\Repository\RepositoryInterface;
interface SolrInterface
{
/**
* @param object|string $entity entity, entity-alias or classname
*/
public function removeDocument($entity);
/**
* @param object|string $entity entity, entity-alias or classname
*
* @return bool
*/
public function addDocument($entity): bool;
/**
* @param AbstractQuery $query
*
* @return array of found documents
*
* @throws SolrException
*/
public function query(AbstractQuery $query): array;
/**
* @param object|string $entity entity, entity-alias or classname
*
* @return bool
*/
public function updateDocument($entity): bool;
/**
* @param object|string $entity entity, entity-alias or classname
*
* @return RepositoryInterface
*
* @throws SolrException if repository of the given $entityAlias does not extend FS\SolrBundle\Repository\Repository
*/
public function getRepository($entity): RepositoryInterface;
/**
* @param object|string $entity entity, entity-alias or classname
*
* @return QueryBuilderInterface
*/
public function createQueryBuilder($entity): QueryBuilderInterface;
}