Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2893567
PhabricatorDefaultSearchEngineSelector.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
600 B
Referenced Files
None
Subscribers
None
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'
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 18:38 (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127507
Default Alt Text
PhabricatorDefaultSearchEngineSelector.php (600 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment