软件版本;5.6.4
运行环境;linux
场景/上下文;
使用morelikethis查询发现搜索的结果在两种结果中来回切换。
有用的信息(请使用代码块粘贴,以方便他人查看);
GET news_v3/_search
{
"query": {
"more_like_this": {
"fields": [
"content.ik",
"title.ik",
"operatinglabel.ik",
"city"
],
"like": "好的",
"min_term_freq": 1,
"max_query_terms": 12
}
}
}
第一种结果:
"hits": {
"total": 167238,
"max_score": 7.970047,
"hits": [
{
"_index": "news_v3",
"_type": "model",
"_id": "0CB848D07B344D17A5A9B6DCFC3F1042",
"_score": 7.970047,
"_source": {
"styletype": 0,
"nid": "0CB848D07B344D17A5A9B6DCFC3F1042",
"recommend": 0,
"type": 0,
"userid": "86-18708668181",
"content": "好的好的玩",
"lcount": 0,
"ismain": 0,
"ccount": 0,
"ptime": 1463979123378,
"categoryid": 0,
"readcount": 0,
"recommendtime": 0,
"updatetime": 1463979123378
}
},
{
"_index": "news_v3",
"_type": "model",
"_id": "C29F4D472DD643C18C0B9418BBCBEAFD",
"_score": 7.702563,
"_source": {
"styletype": 0,
"city": "010",
"nid": "C29F4D472DD643C18C0B9418BBCBEAFD",
"recommend": 0,
"type": 0,
"userid": "86-13901338864",
"content": "好的时光,好的男人,好衣好物好心情 ",
"lcount": 0,
"ismain": 0,
"ccount": 0,
"ptime": 1473218206514,
"categoryid": 0,
"readcount": 1,
"recommendtime": 0,
"updatetime": 1473218206514,
"operatinglabel": [
"日记"
]
}
},
第二种结果
"hits": {
"total": 61,
"max_score": 12.339768,
"hits": [
{
"_index": "news_v3",
"_type": "model",
"_id": "17C1EFF3906144018EAD6D9898133402",
"_score": 12.339768,
"_source": {
"styletype": 0,
"city": "010",
"nid": "17C1EFF3906144018EAD6D9898133402",
"recommend": 0,
"type": 0,
"userid": "86-15011036631",
"content": "特别好的小车。",
"lcount": 2,
"ismain": 0,
"ccount": 0,
"ptime": 1477221971239,
"categoryid": 0,
"readcount": 17,
"recommendtime": 0,
"updatetime": 1477221971239,
"operatinglabel": [
"mini"
]
}
},
{
"_index": "news_v3",
"_type": "model",
"_id": "655D0D9482E54E78A3CDEF84F2F811C9",
"_score": 11.748626,
"_source": {
"styletype": 0,
"city": "010",
"nid": "655D0D9482E54E78A3CDEF84F2F811C9",
"recommend": 0,
"type": 0,
"userid": "86-18637761012",
"content": "感觉不要太好太好的?",
"lcount": 9,
"ismain": 0,
"ccount": 5,
"ptime": 1467009375714,
"categoryid": 0,
"readcount": 55,
"recommendtime": 0,
"updatetime": 1467009375714
}
}
这种是什么情况?
运行环境;linux
场景/上下文;
使用morelikethis查询发现搜索的结果在两种结果中来回切换。
有用的信息(请使用代码块粘贴,以方便他人查看);
GET news_v3/_search
{
"query": {
"more_like_this": {
"fields": [
"content.ik",
"title.ik",
"operatinglabel.ik",
"city"
],
"like": "好的",
"min_term_freq": 1,
"max_query_terms": 12
}
}
}
第一种结果:
"hits": {
"total": 167238,
"max_score": 7.970047,
"hits": [
{
"_index": "news_v3",
"_type": "model",
"_id": "0CB848D07B344D17A5A9B6DCFC3F1042",
"_score": 7.970047,
"_source": {
"styletype": 0,
"nid": "0CB848D07B344D17A5A9B6DCFC3F1042",
"recommend": 0,
"type": 0,
"userid": "86-18708668181",
"content": "好的好的玩",
"lcount": 0,
"ismain": 0,
"ccount": 0,
"ptime": 1463979123378,
"categoryid": 0,
"readcount": 0,
"recommendtime": 0,
"updatetime": 1463979123378
}
},
{
"_index": "news_v3",
"_type": "model",
"_id": "C29F4D472DD643C18C0B9418BBCBEAFD",
"_score": 7.702563,
"_source": {
"styletype": 0,
"city": "010",
"nid": "C29F4D472DD643C18C0B9418BBCBEAFD",
"recommend": 0,
"type": 0,
"userid": "86-13901338864",
"content": "好的时光,好的男人,好衣好物好心情 ",
"lcount": 0,
"ismain": 0,
"ccount": 0,
"ptime": 1473218206514,
"categoryid": 0,
"readcount": 1,
"recommendtime": 0,
"updatetime": 1473218206514,
"operatinglabel": [
"日记"
]
}
},
第二种结果
"hits": {
"total": 61,
"max_score": 12.339768,
"hits": [
{
"_index": "news_v3",
"_type": "model",
"_id": "17C1EFF3906144018EAD6D9898133402",
"_score": 12.339768,
"_source": {
"styletype": 0,
"city": "010",
"nid": "17C1EFF3906144018EAD6D9898133402",
"recommend": 0,
"type": 0,
"userid": "86-15011036631",
"content": "特别好的小车。",
"lcount": 2,
"ismain": 0,
"ccount": 0,
"ptime": 1477221971239,
"categoryid": 0,
"readcount": 17,
"recommendtime": 0,
"updatetime": 1477221971239,
"operatinglabel": [
"mini"
]
}
},
{
"_index": "news_v3",
"_type": "model",
"_id": "655D0D9482E54E78A3CDEF84F2F811C9",
"_score": 11.748626,
"_source": {
"styletype": 0,
"city": "010",
"nid": "655D0D9482E54E78A3CDEF84F2F811C9",
"recommend": 0,
"type": 0,
"userid": "86-18637761012",
"content": "感觉不要太好太好的?",
"lcount": 9,
"ismain": 0,
"ccount": 5,
"ptime": 1467009375714,
"categoryid": 0,
"readcount": 55,
"recommendtime": 0,
"updatetime": 1467009375714
}
}
这种是什么情况?
1 个回复
匿名用户
赞同来自:
对于分布式系统来说 很正常的,不要把它当做关系型数据库。
可以在查询的时候指定优先级,可以避免。