Support searching for Harbormater build plans by name substring

Summary: Ref T10457. Allow build plans to be queried by name.

Test Plan:
  - Searched for plans by name.
  - Renamed a plan, searched for new name.

{F1133085}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15359
This commit is contained in:
epriestley
2016-02-27 08:59:33 -08:00
parent 2e19b78b8d
commit f078fd98d7
8 changed files with 79 additions and 6 deletions

View File

@@ -0,0 +1,7 @@
CREATE TABLE {$NAMESPACE}_harbormaster.harbormaster_buildplanname_ngrams (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
objectID INT UNSIGNED NOT NULL,
ngram CHAR(3) NOT NULL COLLATE {$COLLATE_TEXT},
KEY `key_object` (objectID),
KEY `key_ngram` (ngram, objectID)
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};

View File

@@ -0,0 +1,11 @@
<?php
$table = new HarbormasterBuildPlan();
foreach (new LiskMigrationIterator($table) as $plan) {
PhabricatorSearchWorker::queueDocumentForIndexing(
$plan->getPHID(),
array(
'force' => true,
));
}