Skip to content

Commit

Permalink
Merge pull request #110 from Wikidata-lib/termindex
Browse files Browse the repository at this point in the history
Update / fix TermIndex method call in ResultBuilder
  • Loading branch information
tobijat committed Dec 17, 2014
2 parents dbe8994 + 48f0923 commit 75d07b5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PropertySuggester.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
return;
}

define( 'PropertySuggester_VERSION', '2.0.1' );
define( 'PropertySuggester_VERSION', '2.0.2' );

if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require_once __DIR__ . '/vendor/autoload.php';
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ generate this data from a wikidata dump.

## Release notes

### 2.0.2 (2014-12-17)
* Fix TermIndex method call in ResultBuilder

### 2.0.1 (2014-11-11)
Adjust to new version of DataModel-JavaScript

Expand Down
7 changes: 6 additions & 1 deletion src/PropertySuggester/ResultBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ public function createResultArray( array $suggestions, $language ) {
$ids[] = $id;
}
//See SearchEntities
$terms = $this->termIndex->getTermsOfEntities( $ids, 'property', $language );
$terms = $this->termIndex->getTermsOfEntities(
$ids,
'property',
null,
array( $language )
);
$clusteredTerms = $this->clusterTerms( $terms );

foreach ( $suggestions as $suggestion ) {
Expand Down

0 comments on commit 75d07b5

Please sign in to comment.