Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F468356
20161130.search.02.rebuild.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
817 B
Referenced Files
None
Subscribers
None
20161130.search.02.rebuild.php
View Options
<?php
$search_engine
=
PhabricatorFulltextStorageEngine
::
loadEngine
();
$use_mysql
=
(
$search_engine
instanceof
PhabricatorMySQLFulltextStorageEngine
);
if
(
$use_mysql
)
{
$field
=
new
PhabricatorSearchDocumentField
();
$conn
=
$field
->
establishConnection
(
'r'
);
// We're only going to require this if the index isn't empty: if you're on a
// fresh install, you don't have to do anything.
$any_documents
=
queryfx_one
(
$conn
,
'SELECT * FROM %T LIMIT 1'
,
$field
->
getTableName
());
if
(
$any_documents
)
{
try
{
id
(
new
PhabricatorConfigManualActivity
())
->
setActivityType
(
PhabricatorConfigManualActivity
::
TYPE_REINDEX
)
->
save
();
}
catch
(
AphrontDuplicateKeyQueryException
$ex
)
{
// If we've already noted that this activity is required, just move on.
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 6, 5:10 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
80480
Default Alt Text
20161130.search.02.rebuild.php (817 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment