Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/check/PhabricatorElasticSearchSetupCheck.php
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | foreach ($services as $service) { | ||||
} | } | ||||
if (!$index_exists) { | if (!$index_exists) { | ||||
$summary = pht( | $summary = pht( | ||||
'You enabled Elasticsearch but the index does not exist.'); | 'You enabled Elasticsearch but the index does not exist.'); | ||||
$message = pht( | $message = pht( | ||||
'You likely enabled cluster.search without creating the '. | 'You likely enabled cluster.search without creating the '. | ||||
'index. Run `./bin/search init` to correct the index.'); | 'index. Use the following command to create a new index.'); | ||||
$this | $this | ||||
->newIssue('elastic.missing-index') | ->newIssue('elastic.missing-index') | ||||
->setName(pht('Elasticsearch index Not Found')) | ->setName(pht('Elasticsearch Index Not Found')) | ||||
->addCommand('./bin/search init') | |||||
->setSummary($summary) | ->setSummary($summary) | ||||
->setMessage($message) | ->setMessage($message); | ||||
->addRelatedPhabricatorConfig('cluster.search'); | |||||
} else if (!$index_sane) { | } else if (!$index_sane) { | ||||
$summary = pht( | $summary = pht( | ||||
'Elasticsearch index exists but needs correction.'); | 'Elasticsearch index exists but needs correction.'); | ||||
$message = pht( | $message = pht( | ||||
'Either the Phabricator schema for Elasticsearch has changed '. | 'Either the Phabricator schema for Elasticsearch has changed '. | ||||
'or Elasticsearch created the index automatically. Run '. | 'or Elasticsearch created the index automatically. '. | ||||
'`./bin/search init` to correct the index.'); | 'Use the following command to rebuild the index.'); | ||||
$this | $this | ||||
->newIssue('elastic.broken-index') | ->newIssue('elastic.broken-index') | ||||
->setName(pht('Elasticsearch index Incorrect')) | ->setName(pht('Elasticsearch Index Schema Mismatch')) | ||||
->addCommand('./bin/search init') | |||||
->setSummary($summary) | ->setSummary($summary) | ||||
->setMessage($message); | ->setMessage($message); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } |