diff --git a/model/Metadata/Service/AdvancedSearchSettingsService.php b/model/Metadata/Service/AdvancedSearchSettingsService.php index 93fc290e..e3ca313b 100644 --- a/model/Metadata/Service/AdvancedSearchSettingsService.php +++ b/model/Metadata/Service/AdvancedSearchSettingsService.php @@ -32,11 +32,15 @@ use oat\tao\model\search\Contract\SearchSettingsServiceInterface; use oat\tao\model\search\ResultColumn; use oat\tao\model\search\SearchSettings; +use oat\tao\model\TaoOntology; class AdvancedSearchSettingsService implements SearchSettingsServiceInterface { private const OMIT_PROPERTIES = [ - OntologyRdfs::RDFS_LABEL + OntologyRdfs::RDFS_LABEL, + TaoOntology::PROPERTY_TRANSLATION_TYPE, + TaoOntology::PROPERTY_TRANSLATION_PROGRESS, + TaoOntology::PROPERTY_TRANSLATION_ORIGINAL_RESOURCE_URI, ]; public const DEFAULT_SORT_COLUMN = 'label.raw'; diff --git a/model/Metadata/Service/ClassMetadataSearcher.php b/model/Metadata/Service/ClassMetadataSearcher.php index 7e539ca0..8a02d8a4 100644 --- a/model/Metadata/Service/ClassMetadataSearcher.php +++ b/model/Metadata/Service/ClassMetadataSearcher.php @@ -36,6 +36,7 @@ use oat\tao\model\Lists\Business\Service\GetClassMetadataValuesService; use oat\tao\model\search\ResultSet; use oat\tao\model\search\SearchProxy; +use oat\tao\model\TaoOntology; use oat\taoAdvancedSearch\model\SearchEngine\Driver\Elasticsearch\ElasticSearch; use oat\taoAdvancedSearch\model\SearchEngine\Query; @@ -43,6 +44,12 @@ class ClassMetadataSearcher extends ConfigurableService implements ClassMetadata { private const BASE_LIST_ITEMS_URI = '/tao/PropertyValues/get?propertyUri=%s'; + private const UNACCEPTABLE_PROPERTIES = [ + TaoOntology::PROPERTY_TRANSLATION_TYPE, + TaoOntology::PROPERTY_TRANSLATION_PROGRESS, + TaoOntology::PROPERTY_TRANSLATION_ORIGINAL_RESOURCE_URI, + ]; + use OntologyAwareTrait; public function findAll(ClassMetadataSearchInput $input): ClassCollection @@ -89,8 +96,9 @@ private function getProperties(string $classUri): array $allProperties = [$result]; $allProperties = $this->getRelatedProperties($result, $allProperties); $allProperties = $this->getClassPathProperties($classUri, $allProperties); + $allProperties = $this->filterDuplicatedProperties($allProperties); - return $this->filterDuplicatedProperties($allProperties); + return array_diff_key($allProperties, array_flip(self::UNACCEPTABLE_PROPERTIES)); } private function getClassPathProperties(string $classUri, array $allProperties): array diff --git a/model/SearchEngine/Driver/Elasticsearch/QueryBuilder.php b/model/SearchEngine/Driver/Elasticsearch/QueryBuilder.php index 33c643c8..4ecb4812 100644 --- a/model/SearchEngine/Driver/Elasticsearch/QueryBuilder.php +++ b/model/SearchEngine/Driver/Elasticsearch/QueryBuilder.php @@ -80,6 +80,7 @@ class QueryBuilder 'RadioBox', 'SearchTextBox', 'SearchDropdown', + 'Readonly', ]; private const LOGIC_MODIFIERS = [