diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 25589115d6..4b7222da1b 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -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', diff --git a/src/applications/calendar/search/PhabricatorCalendarEventSearchIndexer.php b/src/applications/calendar/search/PhabricatorCalendarEventSearchIndexer.php index 696e78accd..95bd85267c 100644 --- a/src/applications/calendar/search/PhabricatorCalendarEventSearchIndexer.php +++ b/src/applications/calendar/search/PhabricatorCalendarEventSearchIndexer.php @@ -18,7 +18,7 @@ final class PhabricatorCalendarEventSearchIndexer $doc->setDocumentModified($event->getDateModified()); $doc->addField( - PhabricatorSearchField::FIELD_BODY, + PhabricatorSearchDocumentFieldType::FIELD_BODY, $event->getDescription()); $doc->addRelationship( diff --git a/src/applications/diviner/search/DivinerAtomSearchIndexer.php b/src/applications/diviner/search/DivinerAtomSearchIndexer.php index 8927f35cd5..0e77c6e64c 100644 --- a/src/applications/diviner/search/DivinerAtomSearchIndexer.php +++ b/src/applications/diviner/search/DivinerAtomSearchIndexer.php @@ -16,7 +16,7 @@ final class DivinerAtomSearchIndexer extends PhabricatorSearchDocumentIndexer { ->setDocumentModified($book->getDateModified()); $doc->addField( - PhabricatorSearchField::FIELD_BODY, + PhabricatorSearchDocumentFieldType::FIELD_BODY, $atom->getSummary()); $doc->addRelationship( diff --git a/src/applications/diviner/search/DivinerBookSearchIndexer.php b/src/applications/diviner/search/DivinerBookSearchIndexer.php index c17c627a06..b08042a4f8 100644 --- a/src/applications/diviner/search/DivinerBookSearchIndexer.php +++ b/src/applications/diviner/search/DivinerBookSearchIndexer.php @@ -15,7 +15,7 @@ final class DivinerBookSearchIndexer extends PhabricatorSearchDocumentIndexer { ->setDocumentModified($book->getDateModified()); $doc->addField( - PhabricatorSearchField::FIELD_BODY, + PhabricatorSearchDocumentFieldType::FIELD_BODY, $book->getPreface()); return $doc; diff --git a/src/applications/maniphest/search/ManiphestSearchIndexer.php b/src/applications/maniphest/search/ManiphestSearchIndexer.php index 5dfdee6769..4ac9a51608 100644 --- a/src/applications/maniphest/search/ManiphestSearchIndexer.php +++ b/src/applications/maniphest/search/ManiphestSearchIndexer.php @@ -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( diff --git a/src/applications/passphrase/search/PassphraseSearchIndexer.php b/src/applications/passphrase/search/PassphraseSearchIndexer.php index 44ec9d207a..2f8da05a77 100644 --- a/src/applications/passphrase/search/PassphraseSearchIndexer.php +++ b/src/applications/passphrase/search/PassphraseSearchIndexer.php @@ -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( diff --git a/src/applications/pholio/search/PholioSearchIndexer.php b/src/applications/pholio/search/PholioSearchIndexer.php index d0c0c47a7d..6c1458b799 100644 --- a/src/applications/pholio/search/PholioSearchIndexer.php +++ b/src/applications/pholio/search/PholioSearchIndexer.php @@ -15,7 +15,7 @@ final class PholioSearchIndexer extends PhabricatorSearchDocumentIndexer { ->setDocumentModified($mock->getDateModified()); $doc->addField( - PhabricatorSearchField::FIELD_BODY, + PhabricatorSearchDocumentFieldType::FIELD_BODY, $mock->getDescription()); $doc->addRelationship( diff --git a/src/applications/phriction/search/PhrictionSearchIndexer.php b/src/applications/phriction/search/PhrictionSearchIndexer.php index 7fdc54e7f9..28b7e34bbf 100644 --- a/src/applications/phriction/search/PhrictionSearchIndexer.php +++ b/src/applications/phriction/search/PhrictionSearchIndexer.php @@ -25,7 +25,7 @@ final class PhrictionSearchIndexer $doc->setDocumentModified($content->getDateModified()); $doc->addField( - PhabricatorSearchField::FIELD_BODY, + PhabricatorSearchDocumentFieldType::FIELD_BODY, $content->getContent()); $doc->addRelationship( diff --git a/src/applications/ponder/search/PonderSearchIndexer.php b/src/applications/ponder/search/PonderSearchIndexer.php index a762ade576..1b9e6d3f84 100644 --- a/src/applications/ponder/search/PonderSearchIndexer.php +++ b/src/applications/ponder/search/PonderSearchIndexer.php @@ -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()); } } diff --git a/src/applications/project/customfield/PhabricatorProjectDescriptionField.php b/src/applications/project/customfield/PhabricatorProjectDescriptionField.php index 1da7ce1305..0c18398293 100644 --- a/src/applications/project/customfield/PhabricatorProjectDescriptionField.php +++ b/src/applications/project/customfield/PhabricatorProjectDescriptionField.php @@ -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, ), )); } diff --git a/src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php b/src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php index 9565bf7638..f94aa26b4e 100644 --- a/src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php +++ b/src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php @@ -36,7 +36,7 @@ final class PhabricatorRepositoryCommitSearchIndexer $doc->setDocumentTitle($title); $doc->addField( - PhabricatorSearchField::FIELD_BODY, + PhabricatorSearchDocumentFieldType::FIELD_BODY, $commit_message); if ($author_phid) { diff --git a/src/applications/search/constants/PhabricatorSearchField.php b/src/applications/search/constants/PhabricatorSearchDocumentFieldType.php similarity index 65% rename from src/applications/search/constants/PhabricatorSearchField.php rename to src/applications/search/constants/PhabricatorSearchDocumentFieldType.php index c578cdf109..10dbf0ca65 100644 --- a/src/applications/search/constants/PhabricatorSearchField.php +++ b/src/applications/search/constants/PhabricatorSearchDocumentFieldType.php @@ -1,6 +1,6 @@ documentTitle = $title; - $this->addField(PhabricatorSearchField::FIELD_TITLE, $title); + $this->addField(PhabricatorSearchDocumentFieldType::FIELD_TITLE, $title); return $this; } diff --git a/src/applications/search/index/PhabricatorSearchDocumentIndexer.php b/src/applications/search/index/PhabricatorSearchDocumentIndexer.php index b3e90148ca..5e2140d4e0 100644 --- a/src/applications/search/index/PhabricatorSearchDocumentIndexer.php +++ b/src/applications/search/index/PhabricatorSearchDocumentIndexer.php @@ -154,7 +154,7 @@ abstract class PhabricatorSearchDocumentIndexer extends Phobject { $comment = $xaction->getComment(); $doc->addField( - PhabricatorSearchField::FIELD_COMMENT, + PhabricatorSearchDocumentFieldType::FIELD_COMMENT, $comment->getContent()); } }