mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +01:00
Rename PhabricatorSearchField
to PhabricatorSearchFieldDocumentType
Summary: Ref T8441. I want to use `PhabricatorSearchField` for a better, more useful object. Test Plan: `grep`, `arc lint` Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8441 Differential Revision: https://secure.phabricator.com/D13168
This commit is contained in:
parent
fc3d11809f
commit
68486c4541
14 changed files with 16 additions and 15 deletions
|
@ -2506,13 +2506,13 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSearchDeleteController' => 'applications/search/controller/PhabricatorSearchDeleteController.php',
|
'PhabricatorSearchDeleteController' => 'applications/search/controller/PhabricatorSearchDeleteController.php',
|
||||||
'PhabricatorSearchDocument' => 'applications/search/storage/document/PhabricatorSearchDocument.php',
|
'PhabricatorSearchDocument' => 'applications/search/storage/document/PhabricatorSearchDocument.php',
|
||||||
'PhabricatorSearchDocumentField' => 'applications/search/storage/document/PhabricatorSearchDocumentField.php',
|
'PhabricatorSearchDocumentField' => 'applications/search/storage/document/PhabricatorSearchDocumentField.php',
|
||||||
|
'PhabricatorSearchDocumentFieldType' => 'applications/search/constants/PhabricatorSearchDocumentFieldType.php',
|
||||||
'PhabricatorSearchDocumentIndexer' => 'applications/search/index/PhabricatorSearchDocumentIndexer.php',
|
'PhabricatorSearchDocumentIndexer' => 'applications/search/index/PhabricatorSearchDocumentIndexer.php',
|
||||||
'PhabricatorSearchDocumentQuery' => 'applications/search/query/PhabricatorSearchDocumentQuery.php',
|
'PhabricatorSearchDocumentQuery' => 'applications/search/query/PhabricatorSearchDocumentQuery.php',
|
||||||
'PhabricatorSearchDocumentRelationship' => 'applications/search/storage/document/PhabricatorSearchDocumentRelationship.php',
|
'PhabricatorSearchDocumentRelationship' => 'applications/search/storage/document/PhabricatorSearchDocumentRelationship.php',
|
||||||
'PhabricatorSearchDocumentTypeDatasource' => 'applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php',
|
'PhabricatorSearchDocumentTypeDatasource' => 'applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php',
|
||||||
'PhabricatorSearchEditController' => 'applications/search/controller/PhabricatorSearchEditController.php',
|
'PhabricatorSearchEditController' => 'applications/search/controller/PhabricatorSearchEditController.php',
|
||||||
'PhabricatorSearchEngine' => 'applications/search/engine/PhabricatorSearchEngine.php',
|
'PhabricatorSearchEngine' => 'applications/search/engine/PhabricatorSearchEngine.php',
|
||||||
'PhabricatorSearchField' => 'applications/search/constants/PhabricatorSearchField.php',
|
|
||||||
'PhabricatorSearchHovercardController' => 'applications/search/controller/PhabricatorSearchHovercardController.php',
|
'PhabricatorSearchHovercardController' => 'applications/search/controller/PhabricatorSearchHovercardController.php',
|
||||||
'PhabricatorSearchIndexer' => 'applications/search/index/PhabricatorSearchIndexer.php',
|
'PhabricatorSearchIndexer' => 'applications/search/index/PhabricatorSearchIndexer.php',
|
||||||
'PhabricatorSearchManagementIndexWorkflow' => 'applications/search/management/PhabricatorSearchManagementIndexWorkflow.php',
|
'PhabricatorSearchManagementIndexWorkflow' => 'applications/search/management/PhabricatorSearchManagementIndexWorkflow.php',
|
||||||
|
@ -5998,6 +5998,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSearchDeleteController' => 'PhabricatorSearchBaseController',
|
'PhabricatorSearchDeleteController' => 'PhabricatorSearchBaseController',
|
||||||
'PhabricatorSearchDocument' => 'PhabricatorSearchDAO',
|
'PhabricatorSearchDocument' => 'PhabricatorSearchDAO',
|
||||||
'PhabricatorSearchDocumentField' => 'PhabricatorSearchDAO',
|
'PhabricatorSearchDocumentField' => 'PhabricatorSearchDAO',
|
||||||
|
'PhabricatorSearchDocumentFieldType' => 'Phobject',
|
||||||
'PhabricatorSearchDocumentIndexer' => 'Phobject',
|
'PhabricatorSearchDocumentIndexer' => 'Phobject',
|
||||||
'PhabricatorSearchDocumentQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhabricatorSearchDocumentQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
'PhabricatorSearchDocumentRelationship' => 'PhabricatorSearchDAO',
|
'PhabricatorSearchDocumentRelationship' => 'PhabricatorSearchDAO',
|
||||||
|
|
|
@ -18,7 +18,7 @@ final class PhabricatorCalendarEventSearchIndexer
|
||||||
$doc->setDocumentModified($event->getDateModified());
|
$doc->setDocumentModified($event->getDateModified());
|
||||||
|
|
||||||
$doc->addField(
|
$doc->addField(
|
||||||
PhabricatorSearchField::FIELD_BODY,
|
PhabricatorSearchDocumentFieldType::FIELD_BODY,
|
||||||
$event->getDescription());
|
$event->getDescription());
|
||||||
|
|
||||||
$doc->addRelationship(
|
$doc->addRelationship(
|
||||||
|
|
|
@ -16,7 +16,7 @@ final class DivinerAtomSearchIndexer extends PhabricatorSearchDocumentIndexer {
|
||||||
->setDocumentModified($book->getDateModified());
|
->setDocumentModified($book->getDateModified());
|
||||||
|
|
||||||
$doc->addField(
|
$doc->addField(
|
||||||
PhabricatorSearchField::FIELD_BODY,
|
PhabricatorSearchDocumentFieldType::FIELD_BODY,
|
||||||
$atom->getSummary());
|
$atom->getSummary());
|
||||||
|
|
||||||
$doc->addRelationship(
|
$doc->addRelationship(
|
||||||
|
|
|
@ -15,7 +15,7 @@ final class DivinerBookSearchIndexer extends PhabricatorSearchDocumentIndexer {
|
||||||
->setDocumentModified($book->getDateModified());
|
->setDocumentModified($book->getDateModified());
|
||||||
|
|
||||||
$doc->addField(
|
$doc->addField(
|
||||||
PhabricatorSearchField::FIELD_BODY,
|
PhabricatorSearchDocumentFieldType::FIELD_BODY,
|
||||||
$book->getPreface());
|
$book->getPreface());
|
||||||
|
|
||||||
return $doc;
|
return $doc;
|
||||||
|
|
|
@ -17,7 +17,7 @@ final class ManiphestSearchIndexer extends PhabricatorSearchDocumentIndexer {
|
||||||
$doc->setDocumentModified($task->getDateModified());
|
$doc->setDocumentModified($task->getDateModified());
|
||||||
|
|
||||||
$doc->addField(
|
$doc->addField(
|
||||||
PhabricatorSearchField::FIELD_BODY,
|
PhabricatorSearchDocumentFieldType::FIELD_BODY,
|
||||||
$task->getDescription());
|
$task->getDescription());
|
||||||
|
|
||||||
$doc->addRelationship(
|
$doc->addRelationship(
|
||||||
|
|
|
@ -17,7 +17,7 @@ final class PassphraseSearchIndexer extends PhabricatorSearchDocumentIndexer {
|
||||||
$doc->setDocumentModified($credential->getDateModified());
|
$doc->setDocumentModified($credential->getDateModified());
|
||||||
|
|
||||||
$doc->addField(
|
$doc->addField(
|
||||||
PhabricatorSearchField::FIELD_BODY,
|
PhabricatorSearchDocumentFieldType::FIELD_BODY,
|
||||||
$credential->getDescription());
|
$credential->getDescription());
|
||||||
|
|
||||||
$doc->addRelationship(
|
$doc->addRelationship(
|
||||||
|
|
|
@ -15,7 +15,7 @@ final class PholioSearchIndexer extends PhabricatorSearchDocumentIndexer {
|
||||||
->setDocumentModified($mock->getDateModified());
|
->setDocumentModified($mock->getDateModified());
|
||||||
|
|
||||||
$doc->addField(
|
$doc->addField(
|
||||||
PhabricatorSearchField::FIELD_BODY,
|
PhabricatorSearchDocumentFieldType::FIELD_BODY,
|
||||||
$mock->getDescription());
|
$mock->getDescription());
|
||||||
|
|
||||||
$doc->addRelationship(
|
$doc->addRelationship(
|
||||||
|
|
|
@ -25,7 +25,7 @@ final class PhrictionSearchIndexer
|
||||||
$doc->setDocumentModified($content->getDateModified());
|
$doc->setDocumentModified($content->getDateModified());
|
||||||
|
|
||||||
$doc->addField(
|
$doc->addField(
|
||||||
PhabricatorSearchField::FIELD_BODY,
|
PhabricatorSearchDocumentFieldType::FIELD_BODY,
|
||||||
$content->getContent());
|
$content->getContent());
|
||||||
|
|
||||||
$doc->addRelationship(
|
$doc->addRelationship(
|
||||||
|
|
|
@ -16,7 +16,7 @@ final class PonderSearchIndexer
|
||||||
->setDocumentModified($question->getDateModified());
|
->setDocumentModified($question->getDateModified());
|
||||||
|
|
||||||
$doc->addField(
|
$doc->addField(
|
||||||
PhabricatorSearchField::FIELD_BODY,
|
PhabricatorSearchDocumentFieldType::FIELD_BODY,
|
||||||
$question->getContent());
|
$question->getContent());
|
||||||
|
|
||||||
$doc->addRelationship(
|
$doc->addRelationship(
|
||||||
|
@ -32,7 +32,7 @@ final class PonderSearchIndexer
|
||||||
foreach ($answers as $answer) {
|
foreach ($answers as $answer) {
|
||||||
if (strlen($answer->getContent())) {
|
if (strlen($answer->getContent())) {
|
||||||
$doc->addField(
|
$doc->addField(
|
||||||
PhabricatorSearchField::FIELD_COMMENT,
|
PhabricatorSearchDocumentFieldType::FIELD_COMMENT,
|
||||||
$answer->getContent());
|
$answer->getContent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ final class PhabricatorProjectDescriptionField
|
||||||
'name' => pht('Description'),
|
'name' => pht('Description'),
|
||||||
'type' => 'remarkup',
|
'type' => 'remarkup',
|
||||||
'description' => pht('Short project description.'),
|
'description' => pht('Short project description.'),
|
||||||
'fulltext' => PhabricatorSearchField::FIELD_BODY,
|
'fulltext' => PhabricatorSearchDocumentFieldType::FIELD_BODY,
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ final class PhabricatorRepositoryCommitSearchIndexer
|
||||||
$doc->setDocumentTitle($title);
|
$doc->setDocumentTitle($title);
|
||||||
|
|
||||||
$doc->addField(
|
$doc->addField(
|
||||||
PhabricatorSearchField::FIELD_BODY,
|
PhabricatorSearchDocumentFieldType::FIELD_BODY,
|
||||||
$commit_message);
|
$commit_message);
|
||||||
|
|
||||||
if ($author_phid) {
|
if ($author_phid) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PhabricatorSearchField {
|
final class PhabricatorSearchDocumentFieldType extends Phobject {
|
||||||
|
|
||||||
const FIELD_TITLE = 'titl';
|
const FIELD_TITLE = 'titl';
|
||||||
const FIELD_BODY = 'body';
|
const FIELD_BODY = 'body';
|
|
@ -22,7 +22,7 @@ final class PhabricatorSearchAbstractDocument {
|
||||||
|
|
||||||
public function setDocumentTitle($title) {
|
public function setDocumentTitle($title) {
|
||||||
$this->documentTitle = $title;
|
$this->documentTitle = $title;
|
||||||
$this->addField(PhabricatorSearchField::FIELD_TITLE, $title);
|
$this->addField(PhabricatorSearchDocumentFieldType::FIELD_TITLE, $title);
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ abstract class PhabricatorSearchDocumentIndexer extends Phobject {
|
||||||
|
|
||||||
$comment = $xaction->getComment();
|
$comment = $xaction->getComment();
|
||||||
$doc->addField(
|
$doc->addField(
|
||||||
PhabricatorSearchField::FIELD_COMMENT,
|
PhabricatorSearchDocumentFieldType::FIELD_COMMENT,
|
||||||
$comment->getContent());
|
$comment->getContent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue