Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99654448
PhabricatorDefaultSearchEngineSelector.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jan 26, 00:24
Size
600 B
Mime Type
text/x-php
Expires
Tue, Jan 28, 00:24 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23839356
Attached To
rPH Phabricator
PhabricatorDefaultSearchEngineSelector.php
View Options
<?php
final
class
PhabricatorDefaultSearchEngineSelector
extends
PhabricatorSearchEngineSelector
{
public
function
newEngine
()
{
if
(
self
::
shouldUseElasticSearch
())
{
$elastic_host
=
PhabricatorEnv
::
getEnvConfig
(
'search.elastic.host'
);
$elastic_index
=
PhabricatorEnv
::
getEnvConfig
(
'search.elastic.namespace'
);
return
new
PhabricatorSearchEngineElastic
(
$elastic_host
,
$elastic_index
);
}
return
new
PhabricatorSearchEngineMySQL
();
}
public
static
function
shouldUseElasticSearch
()
{
return
(
bool
)
PhabricatorEnv
::
getEnvConfig
(
'search.elastic.host'
);
}
}
Event Timeline
Log In to Comment