Skip to content

Commit

Permalink
SERVER-380: When testing via mongos, have to enable on all shards
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Dec 25, 2012
1 parent f201972 commit d6cf0d6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions jstests/libs/fts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
// make sure we're enabled
db.adminCommand( { setParameter : "*", textSearchEnabled : true } );

if ( "isdbgrid" == db.runCommand( "ismaster" ).msg ) {
db.getSisterDB( "config" ).shards.find().forEach(
function(shard) {
var m = new Mongo( shard.host );
m.getDB( "admin" ).runCommand( { setParameter : "*", textSearchEnabled: true } );
}
);
}

function queryIDS( coll, search, filter, extra ){
var cmd = { search : search }
if ( filter )
Expand Down

0 comments on commit d6cf0d6

Please sign in to comment.