Beispiel #1
0
Datei: url.go Projekt: qgweb/new
func (this *Domain) cleanPutTable() {
	qconf := mongodb.MongodbQueryConf{}
	qconf.Db = "data_source"
	qconf.Table = "urltrack_put"
	qconf.Index = []string{"cids.id"}
	this.mg.Drop(qconf)
	this.mg.Create(qconf)
	this.mg.EnsureIndex(qconf)
	qconf.Index = []string{"adua"}
	this.mg.EnsureIndex(qconf)
}
Beispiel #2
0
func (this *UserTrack) cleanPutTable() {
	qconf := mongodb.MongodbQueryConf{}
	qconf.Db = "data_source"
	qconf.Table = "useraction_put"
	qconf.Index = []string{"tag.tagId"}
	this.mg.Drop(qconf)
	this.mg.Create(qconf)
	this.mg.EnsureIndex(qconf)
	qconf.Index = []string{"adua"}
	this.mg.EnsureIndex(qconf)
	qconf.Index = []string{"AD"}
	this.mg.EnsureIndex(qconf)

	qconf = mongodb.MongodbQueryConf{}
	qconf.Db = "data_source"
	qconf.Table = "useraction_put_big"
	qconf.Index = []string{"tag.tagId"}
	this.mg_big.Drop(qconf)
	this.mg_big.Create(qconf)
	this.mg_big.EnsureIndex(qconf)
	qconf.Index = []string{"adua"}
	this.mg_big.EnsureIndex(qconf)
	qconf.Index = []string{"AD"}
	this.mg_big.EnsureIndex(qconf)
}