1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02: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:
epriestley 2015-06-05 11:01:25 -07:00
parent fc3d11809f
commit 68486c4541
14 changed files with 16 additions and 15 deletions

View file

@ -2506,13 +2506,13 @@ phutil_register_library_map(array(
'PhabricatorSearchDeleteController' => 'applications/search/controller/PhabricatorSearchDeleteController.php',
'PhabricatorSearchDocument' => 'applications/search/storage/document/PhabricatorSearchDocument.php',
'PhabricatorSearchDocumentField' => 'applications/search/storage/document/PhabricatorSearchDocumentField.php',
'PhabricatorSearchDocumentFieldType' => 'applications/search/constants/PhabricatorSearchDocumentFieldType.php',
'PhabricatorSearchDocumentIndexer' => 'applications/search/index/PhabricatorSearchDocumentIndexer.php',
'PhabricatorSearchDocumentQuery' => 'applications/search/query/PhabricatorSearchDocumentQuery.php',
'PhabricatorSearchDocumentRelationship' => 'applications/search/storage/document/PhabricatorSearchDocumentRelationship.php',
'PhabricatorSearchDocumentTypeDatasource' => 'applications/search/typeahead/PhabricatorSearchDocumentTypeDatasource.php',
'PhabricatorSearchEditController' => 'applications/search/controller/PhabricatorSearchEditController.php',
'PhabricatorSearchEngine' => 'applications/search/engine/PhabricatorSearchEngine.php',
'PhabricatorSearchField' => 'applications/search/constants/PhabricatorSearchField.php',
'PhabricatorSearchHovercardController' => 'applications/search/controller/PhabricatorSearchHovercardController.php',
'PhabricatorSearchIndexer' => 'applications/search/index/PhabricatorSearchIndexer.php',
'PhabricatorSearchManagementIndexWorkflow' => 'applications/search/management/PhabricatorSearchManagementIndexWorkflow.php',
@ -5998,6 +5998,7 @@ phutil_register_library_map(array(
'PhabricatorSearchDeleteController' => 'PhabricatorSearchBaseController',
'PhabricatorSearchDocument' => 'PhabricatorSearchDAO',
'PhabricatorSearchDocumentField' => 'PhabricatorSearchDAO',
'PhabricatorSearchDocumentFieldType' => 'Phobject',
'PhabricatorSearchDocumentIndexer' => 'Phobject',
'PhabricatorSearchDocumentQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorSearchDocumentRelationship' => 'PhabricatorSearchDAO',

View file

@ -18,7 +18,7 @@ final class PhabricatorCalendarEventSearchIndexer
$doc->setDocumentModified($event->getDateModified());
$doc->addField(
PhabricatorSearchField::FIELD_BODY,
PhabricatorSearchDocumentFieldType::FIELD_BODY,
$event->getDescription());
$doc->addRelationship(

View file

@ -16,7 +16,7 @@ final class DivinerAtomSearchIndexer extends PhabricatorSearchDocumentIndexer {
->setDocumentModified($book->getDateModified());
$doc->addField(
PhabricatorSearchField::FIELD_BODY,
PhabricatorSearchDocumentFieldType::FIELD_BODY,
$atom->getSummary());
$doc->addRelationship(

View file

@ -15,7 +15,7 @@ final class DivinerBookSearchIndexer extends PhabricatorSearchDocumentIndexer {
->setDocumentModified($book->getDateModified());
$doc->addField(
PhabricatorSearchField::FIELD_BODY,
PhabricatorSearchDocumentFieldType::FIELD_BODY,
$book->getPreface());
return $doc;

View file

@ -17,7 +17,7 @@ final class ManiphestSearchIndexer extends PhabricatorSearchDocumentIndexer {
$doc->setDocumentModified($task->getDateModified());
$doc->addField(
PhabricatorSearchField::FIELD_BODY,
PhabricatorSearchDocumentFieldType::FIELD_BODY,
$task->getDescription());
$doc->addRelationship(

View file

@ -17,7 +17,7 @@ final class PassphraseSearchIndexer extends PhabricatorSearchDocumentIndexer {
$doc->setDocumentModified($credential->getDateModified());
$doc->addField(
PhabricatorSearchField::FIELD_BODY,
PhabricatorSearchDocumentFieldType::FIELD_BODY,
$credential->getDescription());
$doc->addRelationship(

View file

@ -15,7 +15,7 @@ final class PholioSearchIndexer extends PhabricatorSearchDocumentIndexer {
->setDocumentModified($mock->getDateModified());
$doc->addField(
PhabricatorSearchField::FIELD_BODY,
PhabricatorSearchDocumentFieldType::FIELD_BODY,
$mock->getDescription());
$doc->addRelationship(

View file

@ -25,7 +25,7 @@ final class PhrictionSearchIndexer
$doc->setDocumentModified($content->getDateModified());
$doc->addField(
PhabricatorSearchField::FIELD_BODY,
PhabricatorSearchDocumentFieldType::FIELD_BODY,
$content->getContent());
$doc->addRelationship(

View file

@ -16,7 +16,7 @@ final class PonderSearchIndexer
->setDocumentModified($question->getDateModified());
$doc->addField(
PhabricatorSearchField::FIELD_BODY,
PhabricatorSearchDocumentFieldType::FIELD_BODY,
$question->getContent());
$doc->addRelationship(
@ -32,7 +32,7 @@ final class PonderSearchIndexer
foreach ($answers as $answer) {
if (strlen($answer->getContent())) {
$doc->addField(
PhabricatorSearchField::FIELD_COMMENT,
PhabricatorSearchDocumentFieldType::FIELD_COMMENT,
$answer->getContent());
}
}

View file

@ -11,7 +11,7 @@ final class PhabricatorProjectDescriptionField
'name' => pht('Description'),
'type' => 'remarkup',
'description' => pht('Short project description.'),
'fulltext' => PhabricatorSearchField::FIELD_BODY,
'fulltext' => PhabricatorSearchDocumentFieldType::FIELD_BODY,
),
));
}

View file

@ -36,7 +36,7 @@ final class PhabricatorRepositoryCommitSearchIndexer
$doc->setDocumentTitle($title);
$doc->addField(
PhabricatorSearchField::FIELD_BODY,
PhabricatorSearchDocumentFieldType::FIELD_BODY,
$commit_message);
if ($author_phid) {

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorSearchField {
final class PhabricatorSearchDocumentFieldType extends Phobject {
const FIELD_TITLE = 'titl';
const FIELD_BODY = 'body';

View file

@ -22,7 +22,7 @@ final class PhabricatorSearchAbstractDocument {
public function setDocumentTitle($title) {
$this->documentTitle = $title;
$this->addField(PhabricatorSearchField::FIELD_TITLE, $title);
$this->addField(PhabricatorSearchDocumentFieldType::FIELD_TITLE, $title);
return $this;
}

View file

@ -154,7 +154,7 @@ abstract class PhabricatorSearchDocumentIndexer extends Phobject {
$comment = $xaction->getComment();
$doc->addField(
PhabricatorSearchField::FIELD_COMMENT,
PhabricatorSearchDocumentFieldType::FIELD_COMMENT,
$comment->getContent());
}
}