Completed
Push — master ( 0c68cd...766ef1 )
by Maxence
02:02
created

ElasticSearchService::onSearchingQuery()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 3
1
<?php
2
/**
3
 * Files_FullTextSearch - Index the content of your files
4
 *
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the COPYING file.
7
 *
8
 * @author Maxence Lange <[email protected]>
9
 * @copyright 2018
10
 * @license GNU AGPL version 3 or any later version
11
 *
12
 * This program is free software: you can redistribute it and/or modify
13
 * it under the terms of the GNU Affero General Public License as
14
 * published by the Free Software Foundation, either version 3 of the
15
 * License, or (at your option) any later version.
16
 *
17
 * This program is distributed in the hope that it will be useful,
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 * GNU Affero General Public License for more details.
21
 *
22
 * You should have received a copy of the GNU Affero General Public License
23
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
24
 *
25
 */
26
27
namespace OCA\Files_FullTextSearch\Service;
28
29
30
use OCA\FullTextSearch\IFullTextSearchPlatform;
31
use OCA\FullTextSearch\Model\SearchRequest;
32
33
class ElasticSearchService {
34
35
	/** @var MiscService */
36
	private $miscService;
37
38
39
	/**
40
	 * ElasticSearchService constructor.
41
	 *
42
	 * @param MiscService $miscService
43
	 *
44
	 * @internal param IProviderFactory $factory
45
	 */
46
	public function __construct(MiscService $miscService) {
47
		$this->miscService = $miscService;
48
	}
49
50
51
	/**
52
	 * @param IFullTextSearchPlatform $platform
53
	 */
54
	public function onInitializingIndex(IFullTextSearchPlatform $platform) {
55
		if ($platform->getId() !== 'elastic_search') {
56
			return;
57
		}
58
	}
59
60
61
	/**
62
	 * @param IFullTextSearchPlatform $platform
63
	 */
64
	public function onResettingIndex(IFullTextSearchPlatform $platform) {
65
		if ($platform->getId() !== 'elastic_search') {
66
			return;
67
		}
68
	}
69
70
71
	/**
72
	 * @param IFullTextSearchPlatform $platform
73
	 * @param array $arr
74
	 */
75
	public function onIndexingDocument(IFullTextSearchPlatform $platform, &$arr) {
0 ignored issues
show
Unused Code introduced by
The parameter $arr is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
76
		if ($platform->getId() !== 'elastic_search') {
77
			return;
78
		}
79
	}
80
81
82
}
83