Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-8660

setParameter on mongos should enable parameters on all shard members for textSearch

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.4.0-rc0
    • None
    • None
    • ALL

    Description

      Even though I've set textSearchEnabled to true, mongos thinks it's still set to false:

      mongos> db.adminCommand({'setParameter': '*', 'textSearchEnabled': true})
      { "was" : true, "ok" : 1 }
      mongos> db.test.ensureIndex({'t': 'text'})
      {
      	"singleShard" : "behackett-dt:37017",
      	"err" : "text search not enabled",
      	"code" : 16633,
      	"n" : 0,
      	"connectionId" : 2,
      	"ok" : 1
      }
       
      mongos> db.adminCommand({'setParameter': 1, 'textSearchEnabled': true})
      { "was" : true, "ok" : 1 }
      mongos> db.test.ensureIndex({'t': 'text'})
      {
      	"singleShard" : "behackett-dt:37017",
      	"err" : "text search not enabled",
      	"code" : 16633,
      	"n" : 0,
      	"connectionId" : 2,
      	"ok" : 1
      }
      mongos> db.version()
      2.4.0-rc0

      With a single mongod instance everything works correctly:

      MongoDB shell version: 2.4.0-rc0
      connecting to: 127.0.0.1:30000/test
      >  
      > db.adminCommand({'setParameter': '*', 'textSearchEnabled': true})
      { "was" : false, "ok" : 1 }
      > db.test.ensureIndex({'t': 'text'})
      > db.test.getIndexes()
      [
      	{
      		"v" : 1,
      		"key" : {
      			"_id" : 1
      		},
      		"ns" : "test.test",
      		"name" : "_id_"
      	},
      	{
      		"v" : 1,
      		"key" : {
      			"_fts" : "text",
      			"_ftsx" : 1
      		},
      		"ns" : "test.test",
      		"name" : "t_text",
      		"weights" : {
      			"t" : 1
      		},
      		"default_language" : "english",
      		"language_override" : "language",
      		"textIndexVersion" : 1
      	}
      ]
      > 

      Attachments

        Activity

          People

            Unassigned Unassigned
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: