There's a subtle difference in the way
MongoDBPlugin interprets an undefined sort param vs the core
SEARCH implementation.
On MongoDB, it results in a request to sort on a field that isn't indexed, and on large webs this can result in an empty grid.
diff --git a/lib/Foswiki/Plugins/JQGridPlugin/SearchConnector.pm b/lib/Foswiki/Plugins/JQGridPlugin/SearchConnector.pm
index c874f3b..ae11855 100644
--- a/lib/Foswiki/Plugins/JQGridPlugin/SearchConnector.pm
+++ b/lib/Foswiki/Plugins/JQGridPlugin/SearchConnector.pm
@@ -97,7 +97,7 @@ sub restHandleSearch {
}
}
- my $sort = $request->param('sidx') || '';
+ my $sort = $request->param('sidx') || 'Topic';
my $sord = $request->param('sord') || 'asc';
my $reverse = ($sord eq 'desc'?'on':'off');
--
PaulHarvey - 21 Nov 2011
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. 
