{
"query": {
"function_score": {
"query": {
"bool": {
"should": [
{ "match": {
"title": {
"query": "'.$kw.'",
"boost": 2
}}},
{ "match": {
"url": {
"query": "'.$kw.'",
"boost": 1
}}}
],
"minimum_should_match": 1,
"filter" : {
"term" : {
"wzfl" : "'.$topfl.'"
}
}
}
},
"field_value_factor": {
"field": "qp",
"modifier": "log1p",
"factor": 2
}
}
},
"highlight" : {
"fields" : {
"title" : {},
"discription" : {}
},
"require_field_match" : true
}
}
我要实现一个消息搜索引擎的功能,现在我要增加一个日期的控制功能,但是不知道这段代码插在哪里,多次试验不成功???谢谢大家帮忙
"range" : {
"time" : {
"gt" : 1528535955
}
}
1 个回复
ggg
赞同来自:
Unix timestamp是秒,elasticsearch的date格式epoch,毫秒为单位