# in front of tags and changed index of messages

This commit is contained in:
Senta Mandutz 2019-06-27 11:13:40 +02:00
parent 156ec36d1e
commit 8c0d3dc669
2 changed files with 3 additions and 3 deletions

View File

@ -114,8 +114,8 @@ const CreateMsgRouter = {
function get_insert_tag(id){
$.ajax({ url: "api/tag/"+id, method: "GET" }).done(function (tag) {
data.push(tag.name);
console.log("it worked!");
data.push("#" + tag.name);
console.log("Array:"+this.data);
}).fail(function (e, f, g) {
console.log("cannot load " + id + ".json: " + e + f + g);
})

View File

@ -184,7 +184,7 @@ const dbs = {
_comment: "" },
//createtime: { type: Date, default: Date.now },
});
messageSchema.index({ tag:'text', subject:'text', message:'text', user:'text' });
messageSchema.index({ "$**":'text' });
model.Messages = common.mongoose.model('messages', messageSchema);
model.Messages._list = [ "" ];