Skip to content

Commit

Permalink
Refactor createFields()
Browse files Browse the repository at this point in the history
  • Loading branch information
malberts committed Jan 23, 2025
1 parent 68d7079 commit 1c92d81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/EntryPoints/WikibaseFacetedSearchHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public static function onSearchIndexFields( array &$fields, SearchEngine $engine
}

if ( WikibaseFacetedSearchExtension::getInstance()->getConfig()->isComplete() ) {
$fields = WikibaseFacetedSearchExtension::getInstance()->newSearchIndexFieldsBuilder( $engine )->createFields()
$fields = WikibaseFacetedSearchExtension::getInstance()->newSearchIndexFieldsBuilder( $engine )->createFieldObjects()
+ $fields;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Persistence/Search/SearchIndexFieldsBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public function __construct(
}

/**
* @return array<string, SearchIndexField>
* @return array<string, SearchIndexField> Field objects indexed by field/index name
*/
public function createFields(): array {
public function createFieldObjects(): array {
return $this->makeItemTypeSearchFieldMapping( $this->config->getItemTypeProperty() )
+ $this->makeFacetSearchFieldMappings( $this->config->getFacets()->asArray() );
}
Expand Down

0 comments on commit 1c92d81

Please sign in to comment.