Page MenuHomePhabricator

D14476.diff
No OneTemporary

D14476.diff

diff --git a/src/applications/search/engine/PhabricatorElasticSearchEngine.php b/src/applications/search/engine/PhabricatorElasticSearchEngine.php
--- a/src/applications/search/engine/PhabricatorElasticSearchEngine.php
+++ b/src/applications/search/engine/PhabricatorElasticSearchEngine.php
@@ -66,12 +66,16 @@
'url' => PhabricatorEnv::getProductionURI($handle->getURI()),
'dateCreated' => $doc->getDocumentCreated(),
'_timestamp' => $doc->getDocumentModified(),
- 'field' => array(),
+ 'docfields' => array(),
'relationship' => array(),
);
foreach ($doc->getFieldData() as $field) {
- $spec['field'][] = array_combine(array('type', 'corpus', 'aux'), $field);
+ list($f_type, $corpus, $aux) = $field;
+ $spec['docfields'][$f_type] = array(
+ 'corpus' => $corpus,
+ 'aux' => $aux,
+ );
}
foreach ($doc->getRelationshipData() as $relationship) {
@@ -104,8 +108,8 @@
$doc->setDocumentCreated($hit['dateCreated']);
$doc->setDocumentModified($hit['_timestamp']);
- foreach ($hit['field'] as $fdef) {
- $doc->addField($fdef['type'], $fdef['corpus'], $fdef['aux']);
+ foreach ($hit['docfield'] as $ftype => $fdef) {
+ $doc->addField($ftype, $fdef['corpus'], $fdef['aux']);
}
foreach ($hit['relationship'] as $rtype => $rships) {
@@ -130,7 +134,7 @@
$spec[] = array(
'simple_query_string' => array(
'query' => $query->getParameter('query'),
- 'fields' => array('field.corpus'),
+ 'fields' => array('corpus'),
),
);

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 20, 7:27 PM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7389979
Default Alt Text
D14476.diff (1 KB)

Event Timeline