Skip to content
This repository was archived by the owner on Apr 3, 2022. It is now read-only.

Commit

Permalink
[REPEKA-1073] Remove file metadata from elasticsearch search result
Browse files Browse the repository at this point in the history
Change-Id: I9ad0a1eae5a7c026d7df40df8f613380b6858dfc
  • Loading branch information
pietrzykkevin committed May 27, 2019
1 parent 8681014 commit 875bb96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Repeka/Application/Elasticsearch/Mapping/FtsConstants.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ final class FtsConstants {
'UTF-8',
];

const NOT_RETURNED_TYPES = [
'*.value_file',
'*.value_directory',
];

const NUMERIC_DETECTION_PARAM = 'numeric_detection';

private function __construct() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function getQuery(): Query {
$finalQuery->setSize($this->query->getResultsPerPage());
$finalQuery->setFrom($this->query->getOffset());
}
$finalQuery->setSource(['excludes' => FtsConstants::NOT_RETURNED_TYPES]);
return $finalQuery;
}

Expand Down

0 comments on commit 875bb96

Please sign in to comment.