1 | <?php |
||
28 | final class SearchManager implements SearchManagerInterface |
||
29 | { |
||
30 | /** |
||
31 | * @var Collection |
||
32 | */ |
||
33 | private $types; |
||
34 | |||
35 | /** |
||
36 | * @var SearchResultStorage |
||
37 | */ |
||
38 | private $storage; |
||
39 | |||
40 | /** |
||
41 | * @var AdapterInterface |
||
42 | */ |
||
43 | private $adapter; |
||
44 | |||
45 | public function __construct(Collection $types, SearchResultStorage $storage, AdapterInterface $adapter) |
||
51 | |||
52 | public function search(SearchRequestInterface $request): array |
||
60 | |||
61 | public function addDocument(DocumentInterface $document) |
||
65 | |||
66 | public function addDocuments(Collection $documents, string $locale, string $type) |
||
70 | |||
71 | public function updateDocument(DocumentInterface $document) |
||
75 | |||
76 | public function removeDocument(DocumentInterface $document) |
||
80 | |||
81 | public function createIndex(string $locale, string $type) |
||
85 | |||
86 | public function flushIndex(string $locale, string $type) |
||
90 | |||
91 | public function removeIndex(string $locale, string $type) |
||
95 | |||
96 | public function getType(string $type): TypeInterface |
||
104 | |||
105 | public function getTypes(): Collection |
||
109 | } |
||
110 |