我将ElasticSearch用于我的Meteor应用程序。 elasticsearch-river-mongodb将ES和MongoDB挂钩在一起。
常规全文搜索通过以下代码按预期工作:
var result = Meteor.http.get(url, {
params: {
q: q,
fields: '_id,feed_category,summary,title,description,author',
from: from, // offset into results (defaults to 0)
size: size // number of results to return (defaults to 10)
}
});
我想支持模糊搜索,我试过了:
var result = Meteor.http.get(url, {
params: {
fuzzy: q,
fields: '_id,feed_category,summary,title,description,author',
from: from, // offset into results (defaults to 0)
size: size // number of results to return (defaults to 10)
}
});
它不会返回正确的结果,并且总是有36次点击。
然后我尝试了:
var result = Meteor.http.get(url, {
params: {
"fuzzy_like_this" : {
"fields" : ["_id", "summary", "title", "description", "author"],
"like_text" : q,
"max_query_terms" : 12
},
from: from,
size:size
}
});
与上述相同,不会返回正确的结果,并且始终有36次点击。
如何在Meteor中配置ES模糊度的参数?