EBernhardson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/290250
Change subject: Update for elasticsearch 2.x
......................................................................
Update for elasticsearch 2.x
Elasticsearch deprecated filters, instead making queries usable
everywhere that filters previously were used. ApiFeatureUsage needed
minor tweaks to update to the new convention.
Change-Id: I4ca6e79c57bfc62da60c15b384a2195860a9918b
---
M ApiFeatureUsageQueryEngineElastica.php
1 file changed, 4 insertions(+), 4 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ApiFeatureUsage
refs/changes/50/290250/1
diff --git a/ApiFeatureUsageQueryEngineElastica.php
b/ApiFeatureUsageQueryEngineElastica.php
index f410e8b..626765b 100644
--- a/ApiFeatureUsageQueryEngineElastica.php
+++ b/ApiFeatureUsageQueryEngineElastica.php
@@ -59,13 +59,13 @@
$query = new Elastica\Query();
- $bools = new Elastica\Filter\BoolFilter();
- $bools->addMust( new Elastica\Filter\Prefix(
$this->options['agentField'], $agent ) );
- $bools->addMust( new Elastica\Filter\Range(
$this->options['timestampField'], array(
+ $bools = new Elastica\Query\BoolQuery();
+ $bools->addMust( new Elastica\Query\Prefix(
$this->options['agentField'], $agent ) );
+ $bools->addMust( new Elastica\Query\Range(
$this->options['timestampField'], array(
'gte' => $start->getTimestamp( TS_ISO_8601 ),
'lte' => $end->getTimestamp( TS_ISO_8601 ),
) ) );
- $query->setQuery( new Elastica\Query\Filtered( null, $bools ) );
+ $query->setQuery( $bools );
$termsAgg = new Elastica\Aggregation\Terms( 'feature' );
$termsAgg->setField( $this->options['featureField'] );
--
To view, visit https://gerrit.wikimedia.org/r/290250
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ca6e79c57bfc62da60c15b384a2195860a9918b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApiFeatureUsage
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits