나는 전체 텍스트 검색유성과 함께 작동하도록 적응하려고합니다. mongodb URL을 2.6.1을 실행하는 하나에 내 보냈습니다. 전체 텍스트 검색을 호환 가능하게하려면이 오류가 발생합니다. server/search.js:2:15: Unexpected token .
및 server/search.js:42:7: Unexpected token)
. 내가 뭘 놓치고 있니?유성으로 뛰게하려면 무엇을 잘못하고 있습니까?
server.js
Meteor.methods({
Meteor.ensureIndex("Posts", {
smaintext: "text"
}, function(err, indexname) {
assert.equal(null, err);
});
)
};
Meteor.methods({
feedupdate: function(req) {
Posts.find({
"$text": {
"$search": req
}
}, {
smaintext: 1,
submitted: 1,
_id: 1,
Posts: {
$meta: "Posts"
}
}, {
sort: {
textScore: {
$meta: "posts"
}
}
}).toArray(function(err, items) {
for (e=0;e<101;e++) {
Meteor.users.update({
"_id": this.userId
}, {
"$addToSet": {
"profile.search": item[e]._id
}
});
}
})
}
)
};