@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class DivinerLiveSymbolFulltextEngine
4 extends PhabricatorFulltextEngine {
5
6 protected function buildAbstractDocument(
7 PhabricatorSearchAbstractDocument $document,
8 $object) {
9
10 $atom = $object;
11 $book = $atom->getBook();
12
13 $document
14 ->setDocumentTitle($atom->getTitle())
15 ->setDocumentCreated($book->getDateCreated())
16 ->setDocumentModified($book->getDateModified());
17
18 $document->addField(
19 PhabricatorSearchDocumentFieldType::FIELD_BODY,
20 $atom->getSummary());
21
22 $document->addRelationship(
23 PhabricatorSearchRelationship::RELATIONSHIP_BOOK,
24 $atom->getBookPHID(),
25 DivinerBookPHIDType::TYPECONST,
26 PhabricatorTime::getNow());
27
28 $document->addRelationship(
29 PhabricatorSearchRelationship::RELATIONSHIP_REPOSITORY,
30 $atom->getRepositoryPHID(),
31 PhabricatorRepositoryRepositoryPHIDType::TYPECONST,
32 PhabricatorTime::getNow());
33
34 $document->addRelationship(
35 $atom->getGraphHash()
36 ? PhabricatorSearchRelationship::RELATIONSHIP_OPEN
37 : PhabricatorSearchRelationship::RELATIONSHIP_CLOSED,
38 $atom->getBookPHID(),
39 DivinerBookPHIDType::TYPECONST,
40 PhabricatorTime::getNow());
41 }
42
43}