EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/288541

Change subject: query_and_fetch -> query_then_fetch
......................................................................

query_and_fetch -> query_then_fetch

This was removed in es2.x. By removing it in master it should ease the
transition and allow certain query types to still work. This includes
things like cirrusdump and our most basic text queries.

Change-Id: I4515a03a42afb051e3329fbbaf5383f4195cbe76
---
M includes/Searcher.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/41/288541/1

diff --git a/includes/Searcher.php b/includes/Searcher.php
index 56a424c..068e8ed 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -916,7 +916,7 @@
                                        $query = new \Elastica\Query( new 
\Elastica\Query\Ids( null, $pageIds ) );
                                        $query->setParam( '_source', 
$sourceFiltering );
                                        $query->addParam( 'stats', 'get' );
-                                       $resultSet = $pageType->search( $query, 
array( 'search_type' => 'query_and_fetch' ) );
+                                       $resultSet = $pageType->search( $query, 
array( 'search_type' => 'query_then_fetch' ) );
                                        return $this->success( 
$resultSet->getResults() );
                                } catch ( \Elastica\Exception\NotFoundException 
$e ) {
                                        // NotFoundException just means the 
field didn't exist.
@@ -949,7 +949,7 @@
                                        $query = new \Elastica\Query( $match );
                                        $query->setParam( '_source', false );
                                        $query->addParam( 'stats', 'namespace' 
);
-                                       $resultSet = $pageType->search( $query, 
array( 'search_type' => 'query_and_fetch' ) );
+                                       $resultSet = $pageType->search( $query, 
array( 'search_type' => 'query_then_fetch' ) );
                                        return $this->success( 
$resultSet->getResults() );
                                } catch ( 
\Elastica\Exception\ExceptionInterface $e ) {
                                        return $this->failure( $e );

-- 
To view, visit https://gerrit.wikimedia.org/r/288541
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4515a03a42afb051e3329fbbaf5383f4195cbe76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to