Anomie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/177015
Change subject: Support offsets in prefix searches (just in case)
......................................................................
Support offsets in prefix searches (just in case)
This code isn't actually used, it's just a copy-paste of code from some
other extension (probably MWSearch). But we may as well clean it up for
I7a27a64e to avoid subtle bugs if someday someone does use it.
Change-Id: I48c5e2ebb01f55e33b5474ee49b9d37baf672c62
---
M SolrSearch.php
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SolrStore
refs/changes/15/177015/1
diff --git a/SolrSearch.php b/SolrSearch.php
index 2ce0961..59c00a1 100644
--- a/SolrSearch.php
+++ b/SolrSearch.php
@@ -57,9 +57,9 @@
/**
* PrefixSearchBackend override for OpenSearch results
*/
- static function prefixSearch( $ns, $search, $limit, &$results ) {
+ static function prefixSearch( $ns, $search, $limit, &$results, $offset
= 0 ) {
echo 'Prefix Search!<br />'; // @todo Is this a debug line?
Certainly looks like one...if so, comment out/remove!
- $it = SolrSearchSet::newFromQuery( 'prefix', $search, $ns,
$limit, 0 );
+ $it = SolrSearchSet::newFromQuery( 'prefix', $search, $ns,
$limit, $offset );
$results = array( );
if ( $it ) { // $it can be null
while ( $res = $it->next() ) {
--
To view, visit https://gerrit.wikimedia.org/r/177015
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I48c5e2ebb01f55e33b5474ee49b9d37baf672c62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SolrStore
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits