国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

ElasticSearch8.x操作記錄

這篇具有很好參考價值的文章主要介紹了ElasticSearch8.x操作記錄。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

ElasticSearch8.x操作記錄

文檔內(nèi)容來自于尚硅谷海波老師的ElasticSearch教程課,在Kibana中的一些操作演示

以下為在文檔中的相關(guān)操作記錄

1.索引操作

#創(chuàng)建索引
#PUT 索引名稱
PUT test_index

#PUT 索引
#增加配置:JSON格式的主題內(nèi)容
PUT test_index_1
{
  "aliases": {
    "test1": {}
  }
}

#刪除索引
#delete 索引名稱
DELETE test_index_1

#修改索引配置
#ES不允許修改索引信息
POST test_index_1
{
  "aliases": {
    "test1": {}
  }
}

#HEAD索引 (判讀索引是否存在)HTTP狀態(tài)碼 200404
HEAD test_index

#查詢索引
GET test_index
GET test_index_1
GET test1

#查詢所有索引
GET _cat/indices

#創(chuàng)建文檔(索引數(shù)據(jù))--增加唯一性標識(手動:PUT,后面需要自己添加/自動;POST自動生成,不需要再后面添加)
#首先需要先創(chuàng)建索引
PUT index_doc

PUT index_doc/_doc/1001
{
  "id": 1001,
  "name": "zhangsan",
  "age": 30
}

POST index_doc/_doc
{
  "id": 1002,
  "name": "lisi",
  "age": 14
}

2.文檔操作

#查詢文檔
GET index_doc/_doc/1001

#查詢當前索引中所有的文檔數(shù)據(jù)
GET index_doc/_search

#修改文檔數(shù)據(jù)
PUT index_doc/_doc/1001
{
  "id": 100111,
  "name": "zhangsan",
  "age": 30,
  "tel": "15123392594"
}
#POST修改數(shù)據(jù)
POST index_doc/_doc/okBdhIQB7PHEeADHmDqa
{
  "id": 1003,
  "name": "wangwu",
  "age": 22
}

#刪除數(shù)據(jù)
DELETE index_doc/_doc/okBdhIQB7PHEeADHmDqa

#以下操作是不被允許的
DELETE index_doc/_doc

3.文檔搜索

#增加索引
PUT test_query

DELETE test_query
#添加數(shù)據(jù)
PUT test_query/_bulk
{"index":{"_index": "test_query", "_id":"1001"}}
{"id":"1001", "name": "zhang san", "age": 30}
{"index":{"_index": "test_query", "_id":"1002"}}
{"id":"1002", "name": "li si", "age": 40}
{"index":{"_index": "test_query", "_id":"1003"}}
{"id":"1003", "name": "wang wu", "age": 50}
{"index":{"_index": "test_query", "_id":"1004"}}
{"id":"1004", "name": "zhangsan", "age": 30}
{"index":{"_index": "test_query", "_id":"1005"}}
{"id":"1005", "name": "lisi", "age": 40}
{"index":{"_index": "test_query", "_id":"1006"}}
{"id":"1006", "name": "wangwu", "age": 50}

#Match是分詞查詢,ES會將數(shù)據(jù)分詞(關(guān)鍵詞)保存
#zhang san
GET test_query/_search
{
  "query": {
    "match": {
      "name": "zhang san"
    }
  }
}

GET test_query/_search
{
  "query": {
    "term": {
      "name": {
        "value": "zhang san"
      }
    }
  }
}

#對查詢結(jié)果字段進行限制
GET test_query/_search
{
  "_source": ["name", "age"], 
  "query": {
    "match": {
      "name": "zhang san"
    }
  }
}

#組合多個條件 or
GET test_query/_search
{
  "query": {
    "bool": {
      "should": [
        {
          "match": {
            "name": "zhang"
          }
        },
        {
          "match": {
            "age": "40"
          }
        }
      ]
    }
  }
}

# 排序后查詢
GET test_query/_search
{
  "query": {
    "match": {
      "name": "zhang li"
    }
  },
  "sort": [
    {
      "age": {
        "order": "desc"
      }
    }
  ]
}

#分頁查詢
GET test_query/_search
{
  "query": {
    "match_all": {}
  },
  "from": 4,
  "size": 2
}

4.聚合搜索

# 分組查詢
GET test_query/_search
{
  "aggs": {
    "ageGroup": {
      "terms": {
        "field": "age"
      }
    }
  },
  "size": 0
}

# 分組后聚合(求和)
GET test_query/_search
{
  "aggs": {
    "ageGroup": {
      "terms": {
        "field": "age"
      },
      "aggs": {
        "ageSum": {
          "sum": {
            "field": "age"
          }
        }
      }
    }
  },
  "size": 0
}

# 求年齡平均值
GET test_query/_search
{
  "aggs": {
    "avgAge": {
      "avg": {
        "field": "age"
      }
    }
  },
  "size": 0
}

# 獲取前幾名操作
GET test_query/_search
{
  "aggs": {
    "top3": {
      "top_hits": {
        "sort": [
          {
            "age": {
            "order": "desc"
          }
          }
        ], 
        "size": 3
      }
    }
  },
  "size": 0
}

5.索引模板

PUT test_temp

GET test_temp

PUT test_temp_1
{
  "settings": {
    "number_of_shards": 2
  }
}

GET test_temp_1

#創(chuàng)建模板
PUT _template/mytemplate
{
  "index_patterns": [
    "my*"  
  ],
  "settings": {
    "index": {
      "number_of_shards" : "2"
    }
  },
  "mappings": {
    "properties": {
      "now": {
        "type": "date",
        "format": "yyyy/MM/dd"
      }
    }
  }
}

#查看模板
GET _template/mytemplate

PUT test_temp_2
GET test_temp_2

# 匹配模板規(guī)則,以my開頭
PUT my_test_temp
GET my_test_temp

#刪除模板
DELETE _template/mytemplate

6.中文分詞

#分詞操作
GET _analyze
{
  "analyzer": "standard", 
  "text": ["zhang san"]
}

# 分詞操作(不帶插件情況下,中文拆分邏輯太適合)
GET _analyze
{
  "analyzer": "chinese", 
  "text": ["我是一個三好學生"]
}

# 集成了IK插件后提供的分詞
GET _analyze
{
  "analyzer": "ik_smart", 
  "text": ["我是一個三好學生"]
}

# 集成了IK插件后提供的分詞,相較于上者,分得更加精細
GET _analyze
{
  "analyzer": "ik_max_word", 
  "text": ["我是一個三好學生"]
}

7.文檔評分機制

PUT test_score

PUT test_score/_doc/1001
{
  "text": "zhang kai shou bi, yin jie tai yang"
}

PUT test_score/_doc/1002
{
  "text": "zhang san"
}

GET test_score/_search?explain=true
{
  "query": {
    "match": {
      "text": "zhang"
    }
  }
}
# 公式如下
boost * idf * tf = 2.2 * 0.18232156 * 0.6024096

PUT itwluo

PUT itwluo/_doc/1001
{
  "text": "java"
}

GET itwluo/_search
{
  "query": {
    "match": {
      "text": "java"
    }
  }
}

#result
{
  "took": 992,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 0.2876821,
    "hits": [
      {
        "_index": "itwluo",
        "_id": "1001",
        "_score": 0.2876821,
        "_source": {
          "text": "java"
        }
      }
    ]
  }
}

#詳細結(jié)果
{
  "took": 3,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 0.2876821,
    "hits": [
      {
        "_shard": "[itwluo][0]",
        "_node": "EX7ZCQpSRLu-OWEZjQazog",
        "_index": "itwluo",
        "_id": "1001",
        "_score": 0.2876821,
        "_source": {
          "text": "java"
        },
        "_explanation": {
          "value": 0.2876821,
          "description": "weight(text:java in 0) [PerFieldSimilarity], result of:",
          "details": [
            {
              "value": 0.2876821,
              "description": "score(freq=1.0), computed as boost * idf * tf from:",
              "details": [
                {
                  "value": 2.2,
                  "description": "boost",
                  "details": []
                },
                {
                  "value": 0.2876821,
                  "description": "idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:",
                  "details": [
                    {
                      "value": 1,
                      "description": "n, number of documents containing term",
                      "details": []
                    },
                    {
                      "value": 1,
                      "description": "N, total number of documents with field",
                      "details": []
                    }
                  ]
                },
                {
                  "value": 0.45454544,
                  "description": "tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:",
                  "details": [
                    {
                      "value": 1,
                      "description": "freq, occurrences of term within document",
                      "details": []
                    },
                    {
                      "value": 1.2,
                      "description": "k1, term saturation parameter",
                      "details": []
                    },
                    {
                      "value": 0.75,
                      "description": "b, length normalization parameter",
                      "details": []
                    },
                    {
                      "value": 1,
                      "description": "dl, length of field",
                      "details": []
                    },
                    {
                      "value": 1,
                      "description": "avgdl, average length of field",
                      "details": []
                    }
                  ]
                }
              ]
            }
          ]
        }
      }
    ]
  }
}

#新增數(shù)據(jù)后,觀察分值變化
PUT itwluo/_doc/1002
{
  "text": "java bigdata"
}

#查詢文檔數(shù)據(jù)
GET itwluo/_search?explain=true
{
  "query": {
    "match": {
      "text": "java"
    }
  }
}

#詳細結(jié)果
{
  "took": 609,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 2,
      "relation": "eq"
    },
    "max_score": 0.21110919,
    "hits": [
      {
        "_shard": "[itwluo][0]",
        "_node": "EX7ZCQpSRLu-OWEZjQazog",
        "_index": "itwluo",
        "_id": "1001",
        "_score": 0.21110919,
        "_source": {
          "text": "java"
        },
        "_explanation": {
          "value": 0.21110919,
          "description": "weight(text:java in 0) [PerFieldSimilarity], result of:",
          "details": [
            {
              "value": 0.21110919,
              "description": "score(freq=1.0), computed as boost * idf * tf from:",
              "details": [
                {
                  "value": 2.2,
                  "description": "boost",
                  "details": []
                },
                {
                  "value": 0.18232156,
                  "description": "idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:",
                  "details": [
                    {
                      "value": 2,
                      "description": "n, number of documents containing term",
                      "details": []
                    },
                    {
                      "value": 2,
                      "description": "N, total number of documents with field",
                      "details": []
                    }
                  ]
                },
                {
                  "value": 0.5263158,
                  "description": "tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:",
                  "details": [
                    {
                      "value": 1,
                      "description": "freq, occurrences of term within document",
                      "details": []
                    },
                    {
                      "value": 1.2,
                      "description": "k1, term saturation parameter",
                      "details": []
                    },
                    {
                      "value": 0.75,
                      "description": "b, length normalization parameter",
                      "details": []
                    },
                    {
                      "value": 1,
                      "description": "dl, length of field",
                      "details": []
                    },
                    {
                      "value": 1.5,
                      "description": "avgdl, average length of field",
                      "details": []
                    }
                  ]
                }
              ]
            }
          ]
        }
      },
      {
        "_shard": "[itwluo][0]",
        "_node": "EX7ZCQpSRLu-OWEZjQazog",
        "_index": "itwluo",
        "_id": "1002",
        "_score": 0.160443,
        "_source": {
          "text": "java bigdata"
        },
        "_explanation": {
          "value": 0.160443,
          "description": "weight(text:java in 0) [PerFieldSimilarity], result of:",
          "details": [
            {
              "value": 0.160443,
              "description": "score(freq=1.0), computed as boost * idf * tf from:",
              "details": [
                {
                  "value": 2.2,
                  "description": "boost",
                  "details": []
                },
                {
                  "value": 0.18232156,
                  "description": "idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:",
                  "details": [
                    {
                      "value": 2,
                      "description": "n, number of documents containing term",
                      "details": []
                    },
                    {
                      "value": 2,
                      "description": "N, total number of documents with field",
                      "details": []
                    }
                  ]
                },
                {
                  "value": 0.40000004,
                  "description": "tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:",
                  "details": [
                    {
                      "value": 1,
                      "description": "freq, occurrences of term within document",
                      "details": []
                    },
                    {
                      "value": 1.2,
                      "description": "k1, term saturation parameter",
                      "details": []
                    },
                    {
                      "value": 0.75,
                      "description": "b, length normalization parameter",
                      "details": []
                    },
                    {
                      "value": 2,
                      "description": "dl, length of field",
                      "details": []
                    },
                    {
                      "value": 1.5,
                      "description": "avgdl, average length of field",
                      "details": []
                    }
                  ]
                }
              ]
            }
          ]
        }
      }
    ]
  }
}

# 在上述數(shù)據(jù)基礎(chǔ)上繼續(xù)添加數(shù)據(jù),分析結(jié)果
PUT itwluo/_doc/1003
{
  "text": "bigdata",
  "content": "java bigdata"
}

# 詳細計算結(jié)果
{
  "took": 599,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 2,
      "relation": "eq"
    },
    "max_score": 0.52354836,
    "hits": [
      {
        "_shard": "[itwluo][0]",
        "_node": "EX7ZCQpSRLu-OWEZjQazog",
        "_index": "itwluo",
        "_id": "1001",
        "_score": 0.52354836,
        "_source": {
          "text": "java"
        },
        "_explanation": {
          "value": 0.52354836,
          "description": "weight(text:java in 0) [PerFieldSimilarity], result of:",
          "details": [
            {
              "value": 0.52354836,
              "description": "score(freq=1.0), computed as boost * idf * tf from:",
              "details": [
                {
                  "value": 2.2,
                  "description": "boost",
                  "details": []
                },
                {
                  "value": 0.47000363,
                  "description": "idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:",
                  "details": [
                    {
                      "value": 2,
                      "description": "n, number of documents containing term",
                      "details": []
                    },
                    {
                      "value": 3,
                      "description": "N, total number of documents with field",
                      "details": []
                    }
                  ]
                },
                {
                  "value": 0.50632906,
                  "description": "tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:",
                  "details": [
                    {
                      "value": 1,
                      "description": "freq, occurrences of term within document",
                      "details": []
                    },
                    {
                      "value": 1.2,
                      "description": "k1, term saturation parameter",
                      "details": []
                    },
                    {
                      "value": 0.75,
                      "description": "b, length normalization parameter",
                      "details": []
                    },
                    {
                      "value": 1,
                      "description": "dl, length of field",
                      "details": []
                    },
                    {
                      "value": 1.3333334,
                      "description": "avgdl, average length of field",
                      "details": []
                    }
                  ]
                }
              ]
            }
          ]
        }
      },
      {
        "_shard": "[itwluo][0]",
        "_node": "EX7ZCQpSRLu-OWEZjQazog",
        "_index": "itwluo",
        "_id": "1002",
        "_score": 0.39019167,
        "_source": {
          "text": "java bigdata"
        },
        "_explanation": {
          "value": 0.39019167,
          "description": "weight(text:java in 0) [PerFieldSimilarity], result of:",
          "details": [
            {
              "value": 0.39019167,
              "description": "score(freq=1.0), computed as boost * idf * tf from:",
              "details": [
                {
                  "value": 2.2,
                  "description": "boost",
                  "details": []
                },
                {
                  "value": 0.47000363,
                  "description": "idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:",
                  "details": [
                    {
                      "value": 2,
                      "description": "n, number of documents containing term",
                      "details": []
                    },
                    {
                      "value": 3,
                      "description": "N, total number of documents with field",
                      "details": []
                    }
                  ]
                },
                {
                  "value": 0.37735844,
                  "description": "tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:",
                  "details": [
                    {
                      "value": 1,
                      "description": "freq, occurrences of term within document",
                      "details": []
                    },
                    {
                      "value": 1.2,
                      "description": "k1, term saturation parameter",
                      "details": []
                    },
                    {
                      "value": 0.75,
                      "description": "b, length normalization parameter",
                      "details": []
                    },
                    {
                      "value": 2,
                      "description": "dl, length of field",
                      "details": []
                    },
                    {
                      "value": 1.3333334,
                      "description": "avgdl, average length of field",
                      "details": []
                    }
                  ]
                }
              ]
            }
          ]
        }
      }
    ]
  }
    
# 通過提高權(quán)重,從而提高分數(shù),使排名靠前
DELETE test_score

PUT test_score

PUT /test_score/_doc/1001
{
  "title": "Hadoop is a FrameWork",
  "content": "Hadoop 是一個大數(shù)據(jù)基礎(chǔ)框架"
}

PUT /test_score/_doc/1002
{
  "title": "Hive is a SQL Tools",
  "content": "Hive是一個SQL工具"
}

PUT /test_score/_doc/1003
{
  "title": "Spark is a FrameWork",
  "content": "Spark 是一個分布式計算引擎"
}

GET test_score/_search?explain=true
{
  "query": {
    "bool": {
      "should": [
        {
          "match": {
            "title": {
              "query": "Hadoop", "boost": 1
            }
          }
        },
        {
          "match": {
            "title": {
              "query": "Hive", "boost": 2
            }
          }
        },
        {
          "match": {
            "title": {
              "query": "Spark", "boost": 1
            }
          }
        }
      ]
    }
  }
}

# 詳細結(jié)果分析
{
  "took": 4,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 3,
      "relation": "eq"
    },
    "max_score": 2.2458146,
    "hits": [
      {
        "_shard": "[test_score][0]",
        "_node": "EX7ZCQpSRLu-OWEZjQazog",
        "_index": "test_score",
        "_id": "1002",
        "_score": 2.2458146,
        "_source": {
          "title": "Hive is a SQL Tools",
          "content": "Hive是一個SQL工具"
        },
        "_explanation": {
          "value": 2.2458146,
          "description": "sum of:",
          "details": [
            {
              "value": 2.2458146,
              "description": "weight(title:hive in 0) [PerFieldSimilarity], result of:",
              "details": [
                {
                  "value": 2.2458146,
                  "description": "score(freq=1.0), computed as boost * idf * tf from:",
                  "details": [
                    {
                      "value": 4.4,
                      "description": "boost",
                      "details": []
                    },
                    {
                      "value": 1.2039728,
                      "description": "idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:",
                      "details": [
                        {
                          "value": 1,
                          "description": "n, number of documents containing term",
                          "details": []
                        },
                        {
                          "value": 4,
                          "description": "N, total number of documents with field",
                          "details": []
                        }
                      ]
                    },
                    {
                      "value": 0.42394012,
                      "description": "tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:",
                      "details": [
                        {
                          "value": 1,
                          "description": "freq, occurrences of term within document",
                          "details": []
                        },
                        {
                          "value": 1.2,
                          "description": "k1, term saturation parameter",
                          "details": []
                        },
                        {
                          "value": 0.75,
                          "description": "b, length normalization parameter",
                          "details": []
                        },
                        {
                          "value": 5,
                          "description": "dl, length of field",
                          "details": []
                        },
                        {
                          "value": 4.25,
                          "description": "avgdl, average length of field",
                          "details": []
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      },
      {
        "_shard": "[test_score][0]",
        "_node": "EX7ZCQpSRLu-OWEZjQazog",
        "_index": "test_score",
        "_id": "1003",
        "_score": 1.2336599,
        "_source": {
          "title": "Spark is a FrameWork",
          "content": "Spark 是一個分布式計算引擎"
        },
        "_explanation": {
          "value": 1.2336599,
          "description": "sum of:",
          "details": [
            {
              "value": 1.2336599,
              "description": "weight(title:spark in 2) [PerFieldSimilarity], result of:",
              "details": [
                {
                  "value": 1.2336599,
                  "description": "score(freq=1.0), computed as boost * idf * tf from:",
                  "details": [
                    {
                      "value": 2.2,
                      "description": "boost",
                      "details": []
                    },
                    {
                      "value": 1.2039728,
                      "description": "idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:",
                      "details": [
                        {
                          "value": 1,
                          "description": "n, number of documents containing term",
                          "details": []
                        },
                        {
                          "value": 4,
                          "description": "N, total number of documents with field",
                          "details": []
                        }
                      ]
                    },
                    {
                      "value": 0.46575344,
                      "description": "tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:",
                      "details": [
                        {
                          "value": 1,
                          "description": "freq, occurrences of term within document",
                          "details": []
                        },
                        {
                          "value": 1.2,
                          "description": "k1, term saturation parameter",
                          "details": []
                        },
                        {
                          "value": 0.75,
                          "description": "b, length normalization parameter",
                          "details": []
                        },
                        {
                          "value": 4,
                          "description": "dl, length of field",
                          "details": []
                        },
                        {
                          "value": 4.25,
                          "description": "avgdl, average length of field",
                          "details": []
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      },
      {
        "_shard": "[test_score][0]",
        "_node": "EX7ZCQpSRLu-OWEZjQazog",
        "_index": "test_score",
        "_id": "1001",
        "_score": 0.7102385,
        "_source": {
          "title": "Hadoop is a FrameWork",
          "content": "Hadoop 是一個大數(shù)據(jù)基礎(chǔ)框架"
        },
        "_explanation": {
          "value": 0.7102385,
          "description": "sum of:",
          "details": [
            {
              "value": 0.7102385,
              "description": "weight(title:hadoop in 1) [PerFieldSimilarity], result of:",
              "details": [
                {
                  "value": 0.7102385,
                  "description": "score(freq=1.0), computed as boost * idf * tf from:",
                  "details": [
                    {
                      "value": 2.2,
                      "description": "boost",
                      "details": []
                    },
                    {
                      "value": 0.6931472,
                      "description": "idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:",
                      "details": [
                        {
                          "value": 2,
                          "description": "n, number of documents containing term",
                          "details": []
                        },
                        {
                          "value": 4,
                          "description": "N, total number of documents with field",
                          "details": []
                        }
                      ]
                    },
                    {
                      "value": 0.46575344,
                      "description": "tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:",
                      "details": [
                        {
                          "value": 1,
                          "description": "freq, occurrences of term within document",
                          "details": []
                        },
                        {
                          "value": 1.2,
                          "description": "k1, term saturation parameter",
                          "details": []
                        },
                        {
                          "value": 0.75,
                          "description": "b, length normalization parameter",
                          "details": []
                        },
                        {
                          "value": 4,
                          "description": "dl, length of field",
                          "details": []
                        },
                        {
                          "value": 4.25,
                          "description": "avgdl, average length of field",
                          "details": []
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      }
    ]
  }
}
# 當boost指定為2時, 權(quán)重值翻倍

: 1,
“description”: “freq, occurrences of term within document”,
“details”: []
},
{
“value”: 1.2,
“description”: “k1, term saturation parameter”,
“details”: []
},
{
“value”: 0.75,
“description”: “b, length normalization parameter”,
“details”: []
},
{
“value”: 4,
“description”: “dl, length of field”,
“details”: []
},
{
“value”: 4.25,
“description”: “avgdl, average length of field”,
“details”: []
}
]
}
]
}
]
}
]
}
}
]
}
}

當boost指定為2時, 權(quán)重值翻倍

ElasticSearch8.x操作記錄文章來源地址http://www.zghlxwxcb.cn/news/detail-436256.html

到了這里,關(guān)于ElasticSearch8.x操作記錄的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔相關(guān)法律責任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • Elasticsearch8 - Docker安裝Elasticsearch8.12.2

    Elasticsearch8 - Docker安裝Elasticsearch8.12.2

    最近在學習 ES,所以需要在服務(wù)器上裝一個單節(jié)點的 ES 服務(wù)器環(huán)境:centos 7.9 目前最新版本是 8.12.2 新增配置文件 elasticsearch.yml 解釋一下,前三行是開啟遠程訪問和跨域,最后一行是開啟密碼訪問 Networking | Elasticsearch Guide [8.12] | Elastic 在宿主機創(chuàng)建容器的掛載目錄,我的目錄

    2024年04月15日
    瀏覽(32)
  • Docker安裝ElasticSearch8.X docker安裝elasticsearch8.X完整詳細教程

    Docker安裝ElasticSearch8.X docker安裝elasticsearch8.X完整詳細教程

    Docker常用命令大全 Docker ElasticSearch 官方倉庫 Docker 生產(chǎn)環(huán)境安裝Elasticsearch教程 我這邊選擇的版本是 docker pull elasticsearch:8.8.1 在終端中執(zhí)行以下命令以拉取 docker pull elasticsearch:8.8.1 根據(jù)自己使用過的版本: 使用以下命令創(chuàng)建一個新的 elasticsearch 容器并將其啟動: --name 是 容器

    2024年02月15日
    瀏覽(31)
  • ElasticSearch8 - SpringBoot整合ElasticSearch

    springboot 整合 ES 有兩種方案,ES 官方提供的 Elasticsearch Java API Client 和 spring 提供的 [Spring Data Elasticsearch](Spring Data Elasticsearch) 兩種方案各有優(yōu)劣 Spring:高度封裝,用著舒服。缺點是更新不及時,有可能無法使用 ES 的新 API ES 官方:更新及時,靈活,缺點是太靈活了,基本是一

    2024年03月25日
    瀏覽(78)
  • ElasticSearch8閃退

    ElasticSearch8閃退

    點了.bat文件好幾次,發(fā)現(xiàn)最后每次都是最后出現(xiàn)了一堆報錯信息后一下就沒了。 去ES安裝目錄下的logs文件夾中找到執(zhí)行日志。 查看出錯原因 報錯內(nèi)容為 是按照網(wǎng)上文檔設(shè)置該節(jié)點為主節(jié)點的設(shè)置有問題。 由于下載的版本為8,去查找了官方文檔Elasticsearch Guide 在ES8中設(shè)置主

    2023年04月08日
    瀏覽(22)
  • 搭建Elasticsearch8.0集群

    搭建Elasticsearch8.0集群

    PS:下面的機器名和后邊要配置的集群節(jié)點名字沒有任何關(guān)系,純屬巧合 ########################################### PS: ES8 自帶 jdk ,所以不用配置 ########################################### 新建普通用戶 ########################################### 下載、解壓、修改屬主屬組為esuser(root) 新建數(shù)據(jù)和日志

    2024年02月03日
    瀏覽(25)
  • SpringBoot連接ElasticSearch8.*

    系統(tǒng)中需要使用到ElasticSearch進行內(nèi)容檢索,因此需要搭建SpringBoot + ElasticSearch的環(huán)境。

    2024年02月16日
    瀏覽(25)
  • springboot整合elasticsearch8

    1.引入maven依賴 2.application.yml添加配置 3.編寫config文件 啟動demo項目,通過控制臺日志查看是否能夠正常連接es。 4.在DemoApplicationTests編寫簡單測試操作es。

    2024年02月12日
    瀏覽(22)
  • ElasticSearch8.+ 通過https訪問

    ElasticSearch8之后的版本默認是通過https訪問的 也可以改為http訪問,修改配置文件elasticsearch.yml 把下面配置改為false 重啟就好了。

    2024年02月11日
    瀏覽(14)
  • 【ES】elasticsearch8.3.3

    【ES】elasticsearch8.3.3

    這里僅實踐操作并根據(jù)實際問題進行記錄筆記。 我們需要在自己的電腦上安裝好 Docker Desktop。接著我們運行如下的命令:出現(xiàn)兩個異常,一個是需要使用 winpty 因為我使用win的docker desktop,另外一個問題是docker啟動elasticsearch ERROR: Elasticsearch did not exit normally - check the logs at xx

    2024年02月10日
    瀏覽(16)
  • Elasticsearch8安全配置詳解剖析

    自建的Elasticsearch集群,從8.0版本開始,也默認地簡化了安全功能,為用戶 自動配置: 用戶認證、基于角色的訪問控制進行用戶授權(quán)、使用 TLS 加密的節(jié)點到節(jié)點通信、使用 HTTPS 與 Elasticsearch API 進行加密通信。 為什么我們需要進行如此 復雜 的安全配置,并啟用SSL/TLS對Elas

    2024年02月08日
    瀏覽(24)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包