Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121821497
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
Mon, Jul 14, 04:09
Size
600 B
Mime Type
text/x-php
Expires
Wed, Jul 16, 04:09 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27396515
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