mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Search options.
Test Plan: - Looked at the new options - Saved `search.engine-selector` successfully. Reviewers: epriestley, chad, btrahan Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2255 Differential Revision: https://secure.phabricator.com/D4410
This commit is contained in:
parent
dbdb01f858
commit
08687c0b17
2 changed files with 44 additions and 1 deletions
|
@ -1143,6 +1143,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorSearchAbstractDocument' => 'applications/search/index/PhabricatorSearchAbstractDocument.php',
|
||||
'PhabricatorSearchAttachController' => 'applications/search/controller/PhabricatorSearchAttachController.php',
|
||||
'PhabricatorSearchBaseController' => 'applications/search/controller/PhabricatorSearchBaseController.php',
|
||||
'PhabricatorSearchConfigOptions' => 'applications/search/config/PhabricatorSearchConfigOptions.php',
|
||||
'PhabricatorSearchController' => 'applications/search/controller/PhabricatorSearchController.php',
|
||||
'PhabricatorSearchDAO' => 'applications/search/storage/PhabricatorSearchDAO.php',
|
||||
'PhabricatorSearchDocument' => 'applications/search/storage/document/PhabricatorSearchDocument.php',
|
||||
|
@ -2478,6 +2479,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorSSHWorkflow' => 'PhutilArgumentWorkflow',
|
||||
'PhabricatorSearchAttachController' => 'PhabricatorSearchBaseController',
|
||||
'PhabricatorSearchBaseController' => 'PhabricatorController',
|
||||
'PhabricatorSearchConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||
'PhabricatorSearchController' => 'PhabricatorSearchBaseController',
|
||||
'PhabricatorSearchDAO' => 'PhabricatorLiskDAO',
|
||||
'PhabricatorSearchDocument' => 'PhabricatorSearchDAO',
|
||||
|
@ -2687,7 +2689,11 @@ phutil_register_library_map(array(
|
|||
'PhrictionDAO' => 'PhabricatorLiskDAO',
|
||||
'PhrictionDeleteController' => 'PhrictionController',
|
||||
'PhrictionDiffController' => 'PhrictionController',
|
||||
'PhrictionDocument' => 'PhrictionDAO',
|
||||
'PhrictionDocument' =>
|
||||
array(
|
||||
0 => 'PhrictionDAO',
|
||||
1 => 'PhabricatorPolicyInterface',
|
||||
),
|
||||
'PhrictionDocumentController' => 'PhrictionController',
|
||||
'PhrictionDocumentEditor' => 'PhabricatorEditor',
|
||||
'PhrictionDocumentPreviewController' => 'PhrictionController',
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorSearchConfigOptions
|
||||
extends PhabricatorApplicationConfigOptions {
|
||||
|
||||
public function getName() {
|
||||
return pht("Search");
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
return pht("Options relating to Search.");
|
||||
}
|
||||
|
||||
public function getOptions() {
|
||||
return array(
|
||||
$this->newOption(
|
||||
'search.engine-selector',
|
||||
'class',
|
||||
'PhabricatorDefaultSearchEngineSelector')
|
||||
->setBaseClass('PhabricatorSearchEngineSelector')
|
||||
->setSummary(pht("Search engine selector."))
|
||||
->setDescription(
|
||||
pht(
|
||||
"Phabricator uses a search engine selector to choose which ".
|
||||
"search engine to use when indexing and reconstructing ".
|
||||
"documents, and when executing queries. You can override the ".
|
||||
"engine selector to provide a new selector class which can ".
|
||||
"select some custom engine you implement, if you want to store ".
|
||||
"your documents in some search engine which does not have ".
|
||||
"default support.")),
|
||||
$this->newOption('search.elastic.host', 'string', null)
|
||||
->setDescription(pht("Elastic Search host."))
|
||||
->addExample('http://elastic.example.com:9200/', pht('Valid Setting')),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue