1、调整了jvm
2、按照官网得优化方式配置了参数
没有开启全局序数
下边是查询dsl:
{
"from": 0,
"size": 10,
"timeout": "4s",
"query": {
"bool": {
"must": [
{
"bool": {
"must_not": [
{
"terms": {
"m_site_id": [
"8256",
"8325",
"19810",
"26361",
"28770",
"28771",
"28772",
"28773",
"28774",
"28776",
"28777",
"28778",
"28779"
],
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
{
"bool": {
"should": [
{
"term": {
"g_asp": {
"value": "Baidu",
"boost": 1.0
}
}
},
{
"bool": {
"must_not": [
{
"exists": {
"field": "g_asp",
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
{
"bool": {
"must": [
{
"query_string": {
"query": "微博 罗永浩",
"fields": [
"m_content^1.0",
"m_title^1.0"
],
"type": "best_fields",
"default_operator": "and",
"max_determinized_states": 10000,
"enable_position_increments": true,
"fuzziness": "1",
"fuzzy_prefix_length": 0,
"fuzzy_max_expansions": 50,
"phrase_slop": 0,
"escape": false,
"auto_generate_synonyms_phrase_query": true,
"fuzzy_transpositions": true,
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
{
"bool": {
"must": [
{
"range": {
"m_publish_time": {
"from": "2019-11-20 08:59:55",
"to": "2019-11-22 08:59:55",
"include_lower": true,
"include_upper": true,
"boost": 1.0
}
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
{
"bool": {
"must_not": [
{
"exists": {
"field": "m_url",
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
{
"bool": {
"must_not": [
{
"terms": {
"m_sys_lttb_status": [
"23/01",
"23/02"
],
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
"sort": [
{
"m_publish_time": {
"order": "desc"
}
}
],
"track_total_hits": 2147483647
}
2、按照官网得优化方式配置了参数
没有开启全局序数
下边是查询dsl:
{
"from": 0,
"size": 10,
"timeout": "4s",
"query": {
"bool": {
"must": [
{
"bool": {
"must_not": [
{
"terms": {
"m_site_id": [
"8256",
"8325",
"19810",
"26361",
"28770",
"28771",
"28772",
"28773",
"28774",
"28776",
"28777",
"28778",
"28779"
],
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
{
"bool": {
"should": [
{
"term": {
"g_asp": {
"value": "Baidu",
"boost": 1.0
}
}
},
{
"bool": {
"must_not": [
{
"exists": {
"field": "g_asp",
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
{
"bool": {
"must": [
{
"query_string": {
"query": "微博 罗永浩",
"fields": [
"m_content^1.0",
"m_title^1.0"
],
"type": "best_fields",
"default_operator": "and",
"max_determinized_states": 10000,
"enable_position_increments": true,
"fuzziness": "1",
"fuzzy_prefix_length": 0,
"fuzzy_max_expansions": 50,
"phrase_slop": 0,
"escape": false,
"auto_generate_synonyms_phrase_query": true,
"fuzzy_transpositions": true,
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
{
"bool": {
"must": [
{
"range": {
"m_publish_time": {
"from": "2019-11-20 08:59:55",
"to": "2019-11-22 08:59:55",
"include_lower": true,
"include_upper": true,
"boost": 1.0
}
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
{
"bool": {
"must_not": [
{
"exists": {
"field": "m_url",
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
{
"bool": {
"must_not": [
{
"terms": {
"m_sys_lttb_status": [
"23/01",
"23/02"
],
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
"sort": [
{
"m_publish_time": {
"order": "desc"
}
}
],
"track_total_hits": 2147483647
}
4 个回复
匿名用户
赞同来自:
tacsklet - 公司有用到es
赞同来自:
jiangzhuoyan
赞同来自:
mryu
赞同来自: