【5分钟学会一个知识点】01.Elasticsearch基本操作-增删改查

news2024/10/6 2:21:45

目录

  • 【5分钟学会一个知识点-探索现代搜索与分析引擎的魅力】01.Elasticsearch基本操作-增删改查
  • 1.基本操作
    • 1.1索引操作
    • 1.2文档操作
    • 1.3查询
    • 1.4修改数据
    • 1.5查询
      • 1.5.1条件查询
        • 1.5.1.1遍历所有的索引
        • 1.5.1.2查询某个索引
        • 1.5.1.3条件查询1:使用GET url传参数
        • 1.5.1.4条件查询2:使用body传参
        • 1.5.1.5body全量查询
        • 1.5.1.6分页查询
        • 1.5.1.7过滤一些不需要的字段
        • 1.5.1.8排序
        • 1.5.1.9多条件查询
        • 1.5.1.10 查询结果高亮与完全匹配
        • 1.5.1.11范围查询
        • 1.5.1.12聚合函数
        • 1.5.1.13加上size=0就可以只有聚合结果
        • 1.5.1.14计算平均值
        • 1.5.1.15映射关系
    • 1.6别名
      • 1.6.1 创建别名

🥰微信公众号:【给点知识】分享小知识,快速成长,欢迎关注呀!(底部点击二维码)
🥰学习宗旨:活到老,学到老。
😍写作宗旨:致力于改变现有文章难读难懂问题。

【5分钟学会一个知识点-探索现代搜索与分析引擎的魅力】01.Elasticsearch基本操作-增删改查

1.基本操作

1.1索引操作

  1. 创建索引
PUT /{index}/
  1. 查看某个索引的信息
GET /{index}/
  1. 查看全部的索引
GET /_cat/indices
  1. 删除索引
DELETE /{index}

1.2文档操作

  1. 文档添加:使用POST方法,因为POST不是幂等性的,每次请求,都会创建不同的id所以,需要使用非幂等的方法
POST /{index}/_doc
{
    "price":6999,
    "name":"mac1.1.0",
    "notes":"苹果mac大陆版本 6+64G"
}
// 输出结果
{
    "_index": "computer",
    "_id": "isICNI8B0eUrClfT84k3",
    "_version": 1,
    "result": "created",
    "_shards": {
        "total": 2,
        "successful": 1,
        "failed": 0
    },
    "_seq_no": 0,
    "_primary_term": 1
}
  1. 文档添加:当指定id的时候就可以使用PUT请求,因为id一定,那么只能创建一条数据
PUT /{index}/_doc/{id}
PUT /computer/_doc/001
或者
PUT /computer/_create/001
{
    "price":6999,
    "name":"mac1.2.0",
    "notes":"苹果mac大陆版本 6+128G"
}

// 输出结果
{
    "_index": "computer",
    "_id": "001",
    "_version": 1,
    "result": "created",
    "_shards": {
        "total": 2,
        "successful": 1,
        "failed": 0
    },
    "_seq_no": 1, 
    "_primary_term": 1
}

1.3查询

  1. 查询所有的数据
GET /{index}/_search
  1. 主键查询
GET /{index}/_doc/{id}/

1.4修改数据

  1. 修改是根据文档id修改,如果存在就修改否则就新增
    PUT修改是全量的更新
PUT /{index}/_doc/{id}
body:
{
    "price":6999,
    "name":"mac1.2.0",
    "notes":"苹果mac大陆版本 6+128G"
}

# 输出结果如下
返回结果:例如下面的result显示的是upadted
{
    "_index": "computer",
    "_id": "1001",
    "_version": 2,
    "result": "updated", // 这里显示结果是updated 
    "_shards": {
        "total": 2,
        "successful": 1,
        "failed": 0
    },
    "_seq_no": 5,
    "_primary_term": 3
}

如果传入参数如下,就会造成,传入几个字段就更新几个字段,因为PUT是幂等的

PUT /{index}/_doc/{id}
POST  /{index}/_doc/{id}
body:
{
    "price":2999
}
# 输出结果如下只有一个字段了
{
	"_index": "computer",
	"_id": "1001",
	"_score": 1.0,
	"_source": {
		"price": 2999
	}
}

以上是因为 PUT是全量更新,为了达到局部更新,这里可以使用POST实现
2. POST实现局部更新

POST /{index}/_update/{id}

{
    "doc":{
	    "price":2999,
	    "name":"mac1.2.0",
	    "notes":"苹果mac大陆版本 6+128G"
	}
}


如果增加了一个字段,那么直接增加也会出现一个字段

POST /{index}/_update/{id}

{
    "doc":{
	    "price":2999,
	    "name":"mac1.2.0",
	    "notes":"苹果mac大陆版本 6+128G",
	    "text":"text"
	}
}
# 输出结果
 "hits": [
	{
		"_index": "computer",
		"_id": "1001",
		"_score": 1.0,
		"_source": {
			"price": 2999,
			"name": "mac1.2.0",
			"notes": "苹果mac大陆版本 6+128G",
			"text": "text"
		}
	}

🥰微信公众号:【给点知识】分享小知识,快速成长,欢迎关注呀!(底部点击二维码)
🥰学习宗旨:活到老,学到老。
😍写作宗旨:致力于改变现有文章难读难懂问题。
在这里插入图片描述

1.5查询

1.5.1条件查询

1.5.1.1遍历所有的索引
GET /_search
1.5.1.2查询某个索引
GET /{index}/_search
1.5.1.3条件查询1:使用GET url传参数
GET /{index}/_search?q=filed:xxx
eg:http://10.67.199.181:8080/iphone/_search?q=name:小米
1.5.1.4条件查询2:使用body传参
GET/POST  /{index}/_search

{
    "query":{ // 我要做个什么:查询
        "match":{ // 什么查询:匹配
            "name":"小米华为" // 查询那个字段以及对应字段的的值
        }
    }
}
# 查询索引
{
    "took": 26,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 2,
            "relation": "eq"
        },
        "max_score": 2.7901525,
        "hits": [
            {
                "_index": "iphone",
                "_id": "SSMWTo8B3uHRqn1-nWGc",
                "_score": 2.7901525,
                "_source": {
                    "price": 9999,
                    "name": "华为meta60",
                    "notes": "华为meta60 6+64G"
                }
            },
            {
                "_index": "iphone",
                "_id": "SiMWTo8B3uHRqn1-xGER",
                "_score": 1.7503443,
                "_source": {
                    "price": 9999,
                    "name": "保时捷版本华为meta60",
                    "notes": "华为meta60 6+64G"
                }
            }
        ]
    }
}
1.5.1.5body全量查询
GET/POST  /{index}/_search

{
    "query":{ // 我要做个什么:查询
        "match_all":{ // 什么查询:全量匹配
        }
    }
}
1.5.1.6分页查询
GET/POST /{index}/_search
{
     "query":{
         "match_all":{
         }
     },
     "from":0,// 开始
     "size":2 // 每页个数
}
1.5.1.7过滤一些不需要的字段
```python
GET/POST /{index}/_search
{
     "query":{
         "match_all":{
         }
     },
     "from":0,// 开始
     "size":2, // 每页个数
     "_source":["name"]
}
1.5.1.8排序
GET/POST /{index}/_search
{
     "query":{
         "match_all":{
         }
     },
     "from":0,
     "size":2,
     "_source":["name"],
     "sort":{
        "price":{
            "order":"desc"
        }
     }
}
1.5.1.9多条件查询
GET/POST   /{index}/_search
1.或者条件:should
{
    "query": {
        "bool": {
            "should": [
                {
                    "match": {
                        "name": "小米"
                    }
                },
                {
                    "match": {
                        "price": "1999"
                    }
                }
            ]
        }
    }
}
2. 同时成立:must
{
    "query": {
        "bool": {
            "must": [
                {
                    "match": {
                        "name": "小米"
                    }
                },
                {
                    "match": {
                        "price": "1999"
                    }
                }
            ]
        }
    }
}
1.5.1.10 查询结果高亮与完全匹配
GET/POST   /{index}/_search
{
     "query":{
          "match_phrase":{ // 完全不配
               "name":"小米"
          }
    },
    "hightlight":{ // 对那个字段进行高亮
		"field":{
		    "name":{}
		}
    }
}
1.5.1.11范围查询
GET/POST   /{index}/_search
{
    "query": {
        "bool": {
            "should": [
                {
                    "match": {
                        "name": "华为"
                    }
                },
                {
                    "match": {
                        "price": "2988"
                    }
                }
            ],
            "filter":{
                "range":{
                    "price":{
                        "gt":"11009"
                    }
                }
            }
        }
    }
}
1.5.1.12聚合函数
GET/POST   /{index}/_search
# body
{
    "aggs":{
        "price_agg":{
            "terms":{
                "field":"price"
            }
        }
    }
}
# 返回结果
{
    "took": 11,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 3,
            "relation": "eq"
        },
        "max_score": 1.0,
        "hits": [
            {
                "_index": "computer",
                "_id": "1001",
                "_score": 1.0,
                "_source": {
                    "price": 2999,
                    "name": "mac1.2.0",
                    "notes": "苹果mac大陆版本 6+128G",
                    "text": "text"
                }
            },
            {
                "_index": "computer",
                "_id": "isICNI8B0eUrClfT84k3",
                "_score": 1.0,
                "_source": {
                    "price": 6999,
                    "name": "mac1.1.0",
                    "notes": "苹果mac大陆版本 6+64G"
                }
            },
            {
                "_index": "computer",
                "_id": "001",
                "_score": 1.0,
                "_source": {
                    "price": 6999,
                    "name": "mac1.2.0",
                    "notes": "苹果mac大陆版本 6+128G"
                }
            }
        ]
    },
    "aggregations": {
        "price_agg": {
            "doc_count_error_upper_bound": 0,
            "sum_other_doc_count": 0,
            "buckets": [
                {
                    "key": 6999,
                    "doc_count": 2
                },
                {
                    "key": 2999,
                    "doc_count": 1
                }
            ]
        }
    }
}
1.5.1.13加上size=0就可以只有聚合结果
GET/POST   /{index}/_search
# body
{
    "aggs":{
        "price_agg":{
            "terms":{
                "field":"price"
            }
        }
    },
    "size":0
}
# 返回结果
{
    "took": 40,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 3,
            "relation": "eq"
        },
        "max_score": null,
        "hits": []
    },
    "aggregations": {
        "price_agg": {
            "doc_count_error_upper_bound": 0,
            "sum_other_doc_count": 0,
            "buckets": [
                {
                    "key": 6999,
                    "doc_count": 2
                },
                {
                    "key": 2999,
                    "doc_count": 1
                }
            ]
        }
    }
}
1.5.1.14计算平均值
GET/POST   /{index}/_search
# body
{
    "aggs":{
        "price_avg":{
            "avg":{
                "field":"price"
            }
        }
    },
    "size":0
}
# 返回结果
{
    "took": 8,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 3,
            "relation": "eq"
        },
        "max_score": null,
        "hits": []
    },
    "aggregations": {
        "price_agg": {
            "value": 5665.666666666667
        }
    }
}
1.5.1.15映射关系

场景描述:有些查询时分词,有些不是,那么如何设置让那个字段可以分词或者不可以分词呢?
通过以下方式可以给每个字段设置所含有的属性
type:数据类型 keyword表示关键词必须全部匹配
index:是否可以被索引,true表示可以被索引

{
     "properties":{
          "name":{
                "type":"text",
                 "index":true
          },
          "gender":{
                "type":"keyword",
                 "index":true
          },
          "tel":{
                "type":"keyword",
                 "index":false
          }
     }
}
  1. 创建索引
PUT  /{index}
PUT /person
  1. 给索引设置属性
PUT /{index}/_mapping
{
     "properties":{
          "name":{
                "type":"text",
                 "index":true
          },
          "gender":{
                "type":"keyword",
                 "index":true
          },
          "tel":{
                "type":"keyword",
                 "index":false
          }
     }
}
  1. 直接在创建索引的时候直接加入属性
PUT /my_index
{
  "mappings": {
    "properties": {
      "name": {
        "type": "text"
      },
      "price": {
        "type": "integer"
      },
      "notes": {
        "type": "text"
      }
    }
  }
}

查询看效果:name是text类型,可以被分词查询.

POST /{index}/_search
// 请求体
{
    "query":{
        "match":{
            "name":"里张"
        }
    }
}
// 返回结果
{
    "took": 14,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 2,
            "relation": "eq"
        },
        "max_score": 1.2613049,
        "hits": [
            {
                "_index": "person",
                "_id": "003",
                "_score": 1.2613049,
                "_source": {
                    "name": "里斯",
                    "gender": "男生",
                    "tel": "19889999999"
                }
            },
            {
                "_index": "person",
                "_id": "004",
                "_score": 1.2613049,
                "_source": {
                    "name": "张三",
                    "gender": "男生",
                    "tel": "18888888888"
                }
            }
        ]
    }
}

注意:如果想实现text不分词查询也可使用

{
    "query":{
        "match_phrase":{
            "name":"里斯"
        }
    }
}

然后再查询其他字段

GET /{index}/_search
{
    "query":{
        "match":{
            "gender":"男女"
        }
    }
}
// 返回结果
{
    "took": 7,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 0,
            "relation": "eq"
        },
        "max_score": null,
        "hits": []
    }
}

使用gender:男生。是可以查询的

GET /{index}/_search
{
    "query":{
        "match":{
            "gender":"男生"
        }
    }
}

{
    "took": 13,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 2,
            "relation": "eq"
        },
        "max_score": 0.6931471,
        "hits": [
            {
                "_index": "person",
                "_id": "003",
                "_score": 0.6931471,
                "_source": {
                    "name": "里斯",
                    "gender": "男生",
                    "tel": "19889999999"
                }
            },
            {
                "_index": "person",
                "_id": "004",
                "_score": 0.6931471,
                "_source": {
                    "name": "张三",
                    "gender": "男生",
                    "tel": "18888888888"
                }
            }
        ]
    }
}

8.x版本的是类型是text才可以设置index 是否可以被索引。测试发现当type=keyword时设置index无效。当为 text时是可以的。

{
     "mappings":{
          "properties":{
               "name":{
                    "type":"text",
                    "index":true
               },
               "gender":{
                    "type":"keyword",
                    "index":false
               },
               "tel":{
                    "type":"text",
                    "index":false
               }
          }
     }
}

在这里插入图片描述

使用tel查询的时候提示错误不能被查询
在这里插入图片描述

1.6别名

1.6.1 创建别名

一个别名可以对应多个索引,别名对应多个索引可以用于检索不同的内容。
比如有索引
index001、index002、iphone

{
    "took": 47,
    "timed_out": false,
    "_shards": {
        "total": 3,
        "successful": 3,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 13,
            "relation": "eq"
        },
        "max_score": 1.0,
        "hits": [
            {
                "_index": "index001",
                "_id": "001",
                "_score": 1.0,
                "_source": {
                    "name": "法兰",
                    "tell": "19998888888",
                    "index001": "英国"
                }
            },
            {
                "_index": "index001",
                "_id": "002",
                "_score": 1.0,
                "_source": {
                    "name": "里斯",
                    "tell": "17778888888",
                    "index001": "美国"
                }
            },
            {
                "_index": "index001",
                "_id": "003",
                "_score": 1.0,
                "_source": {
                    "name": "张三",
                    "tell": "18888888888",
                    "index001": "中国"
                }
            },
            {
                "_index": "index002",
                "_id": "001",
                "_score": 1.0,
                "_source": {
                    "name": "里斯2",
                    "tell": "18999998888",
                    "index002": "美国"
                }
            },
            {
                "_index": "index002",
                "_id": "002",
                "_score": 1.0,
                "_source": {
                    "name": "青青",
                    "tell": "11111111111",
                    "index002": "英国"
                }
            },
            {
                "_index": "index002",
                "_id": "003",
                "_score": 1.0,
                "_source": {
                    "name": "王五2",
                    "tell": "13333333336",
                    "index002": "中国"
                }
            },
            {
                "_index": "iphone",
                "_id": "RyMWTo8B3uHRqn1-JGGx",
                "_score": 1.0,
                "_source": {
                    "price": 6999,
                    "name": "iphone15 pro",
                    "notes": "苹果15大陆版本 6+64G"
                }
            },
            {
                "_index": "iphone",
                "_id": "SSMWTo8B3uHRqn1-nWGc",
                "_score": 1.0,
                "_source": {
                    "price": 9999,
                    "name": "华为meta60",
                    "notes": "华为meta60 6+64G"
                }
            },
            {
                "_index": "iphone",
                "_id": "SiMWTo8B3uHRqn1-xGER",
                "_score": 1.0,
                "_source": {
                    "price": 9999,
                    "name": "保时捷版本华为meta60",
                    "notes": "华为meta60 6+64G"
                }
            },
            {
                "_index": "iphone",
                "_id": "SyMXTo8B3uHRqn1-CGFr",
                "_score": 1.0,
                "_source": {
                    "price": 99,
                    "name": "三星盖乐世",
                    "notes": "三星盖乐世 6+64G"
                }
            }
        ]
    }
}

创建别名

POST /_aliases
{
  "actions": [
    {
      "add": {
        "indices": ["index001", "index002", "iphone"],
        "alias": "alias-index001-index002-iphone"
      }
    }
  ]
}

别名搜索:直接所有别名就可以直接搜索到对应的值

GET /{index}/_search
# 查询请求体
{
    "query": {
        "bool": {
            "must": [
                {
                    "match": {
                        "name": "三星"
                    }
                }
            ]
        }
    }
}
# 返回结果
{
    "took": 255,
    "timed_out": false,
    "_shards": {
        "total": 3,
        "successful": 1,
        "skipped": 0,
        "failed": 2,
        "failures": [
            {
                "shard": 0,
                "index": "index001",
                "node": "W8VpzO2_RDSExCsKqgEG0w",
                "reason": {
                    "type": "query_shard_exception",
                    "reason": "failed to create query: Cannot search on field [name] since it is not indexed.",
                    "index_uuid": "m_O1UmvdSRCIXgFipofDbw",
                    "index": "index001",
                    "caused_by": {
                        "type": "illegal_argument_exception",
                        "reason": "Cannot search on field [name] since it is not indexed."
                    }
                }
            },
            {
                "shard": 0,
                "index": "index002",
                "node": "W8VpzO2_RDSExCsKqgEG0w",
                "reason": {
                    "type": "query_shard_exception",
                    "reason": "failed to create query: Cannot search on field [name] since it is not indexed.",
                    "index_uuid": "mQynij2cTqmJVEQUxGGZBw",
                    "index": "index002",
                    "caused_by": {
                        "type": "illegal_argument_exception",
                        "reason": "Cannot search on field [name] since it is not indexed."
                    }
                }
            }
        ]
    },
    "hits": {
        "total": {
            "value": 1,
            "relation": "eq"
        },
        "max_score": 3.1534967,
        "hits": [
            {
                "_index": "iphone",
                "_id": "SyMXTo8B3uHRqn1-CGFr",
                "_score": 3.1534967,
                "_source": {
                    "price": 99,
                    "name": "三星盖乐世",
                    "notes": "三星盖乐世 6+64G"
                }
            }
        ]
    }
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1669292.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

18、案例实战:上亿请求轻松应对,看年轻代垃圾回收如何助力电商性能飞跃!

18.1、背景引入 我们通常会通过案例分析,来指导大家如何在不同的场景下,预测系统的内存使用模型。我们需要合理地调整新生代、老年代、Eden和Survivor各个区域的内存大小,然后尽可能地优化参数,以减少新生代对象进入老年代的情况…

An 2024下载

An2024下载: 百度网盘下载https://pan.baidu.com/s/1cQQCFL16OUY1G6uQWgDbSg?pwdSIMS Adobe Animate 2024,作为Flash技术的进化顶点,是Adobe匠心打造的动画与交互内容创作的旗舰软件。这款工具赋予设计师与开发者前所未有的创意自由&#x…

火绒安全原理、用法、案例和注意事项

火绒安全是一款功能强大的安全软件,它采用了先进的安全技术和算法,通过实时监测、恶意代码识别、防火墙功能、沙箱技术和网络保护等多种手段,为用户提供全面的计算机安全防护。 1.为什么选用火绒安全? 火绒安全是一款优秀的安全软…

用lobehub打造一个永久免费的AI个人助理

Lobe Chat是一个开源的高性能聊天机器人框架,它被设计来帮助用户轻松创建和部署自己的聊天机器人。这个框架支持多种智能功能,比如语音合成(就是让机器人能说话),还能理解和处理多种类型的信息,不仅限于文字…

AI图书推荐:用GPT-4进行预测分析的实用指南

《用GPT-4进行预测分析的实用指南》(A Practical Guide to Predictive Analytics with GPT-4)为读者提供了一个全面的指南,介绍了如何利用GPT-4的强大预测能力,从理解预测分析的基础,到掌握GPT-4的使用,再到…

基于yolov5+gradio目标检测演示系统设计

YOLOv5与Gradio:目标检测可视化展示的新篇章 随着人工智能技术的深入发展,目标检测已成为现代智能应用中的一项关键技术。YOLOv5,作为目标检测领域的杰出代表,凭借其出色的实时性和准确性,赢得了广泛的认可和应用。而…

电力场景设备漏油检测数据集VOC+YOLO格式338张1类别

数据集格式:Pascal VOC格式YOLO格式(不包含分割路径的txt文件,仅仅包含jpg图片以及对应的VOC格式xml文件和yolo格式txt文件) 图片数量(jpg文件个数):338 标注数量(xml文件个数):338 标注数量(txt文件个数):338 标注类别…

数据缓存,可以尝试RocksDB了

shigen坚持更新文章的博客写手,擅长Java、python、vue、shell等编程语言和各种应用程序、脚本的开发。记录成长,分享认知,留住感动。 个人IP:shigen shigen在最近的学习中,接触到了一款新的缓存数据库RocksDB&#xff…

SQL语句优化技巧

目录 1、sql语句规范 2、sql语句优化 1、sql语句规范 MySQL在Linux系统下数据库名,表名,存储过程名,函数名称,触发器名称等区分大小写,列名不区分大小写,原因是这些操作系统下文件名称区分大小写。 MySQL…

LNMP 环境下 Nginx 1.26.0 开启 HTTP/3 QUIC 支持

前几天 Nginx 1.26.0 主线版发布了,明月总算抽出时间更新了,那么自然的也要尝试一下开启 HTTP/3 QUIC 支持了,今天就给大家分享一下。对于我们的网站来说开启 HTTP/3 QUIC 最大的好处是页面载入速度的提升,尤其是在支持 HTTP/3 QU…

安卓模拟器怎么修改ip地址

最近很多老铁玩游戏的,想多开模拟器一个窗口一个IP,若模拟器窗口开多了,IP一样会受到限制,那么怎么更换自己电脑手机模拟器IP地址呢,今天就教大家一个修改模拟器IP地址的方法!废话不多说,直接上…

牛客NC363 开锁【中等 BFS Java/Go/PHP】

题目 题目链接: https://www.nowcoder.com/practice/e7cbabbf7e0a41ec98055ee5f3d33bbe https://www.lintcode.com/problem/796 思路 Java代码 import java.util.*;public class Solution {/*** 代码中的类名、方法名、参数名已经指定,请勿修改&#x…

文件系统(未打开的文件)

之前我们讲述的一些文件操作都是在文件被打开的基础上的,因为用户想要对某个文件做操作的话,这个文件一定是被打开的,也就是一定是内存级的文件。 但是有的没有被操作的文件,是在磁盘中的,我们的笔记本是在SSD中&…

Debian Linux 下给Nginx 1.26.0 编译增加Brotli算法支持

明月发现参考【给Nginx添加谷歌Brotli压缩算法支持】一文给出的方法,在Debian Linux 12.5下就一直编译失败,主要的错误是因为文件缺失,在专门又安装了apt-get install libbrotli-dev的依赖库后依然会因为文件缺失无法编译完成,就这…

JCR一区 | Matlab实现1D-2D-GASF-CNN-BiLSTM-MATT的多通道输入数据分类预测

JCR一区 | Matlab实现1D-2D-GASF-CNN-BiLSTM-MATT的多通道输入数据分类预测 目录 JCR一区 | Matlab实现1D-2D-GASF-CNN-BiLSTM-MATT的多通道输入数据分类预测分类效果基本介绍程序设计参考资料 分类效果 基本介绍 Matlab实现1D-2D-GASF-CNN-BiLSTM-MATT的多通道输入数据分类预…

Postman基础功能-常见类型的接口请求

天空灰暗到一定程度,星辰就会熠熠生辉。大家好,之前给大家分享了关于 Postman 工具的介绍以及安装,在当今数字化的时代,接口请求在软件开发和系统集成中扮演着至关重要的角色。而 Postman 作为一款强大且广受认可的接口测试工具&a…

信息系统项目管理师0105:项目评估与决策(7项目立项管理—7.3项目评估与决策)

点击查看专栏目录 文章目录 7.3项目评估与决策1.评估依据2.评估的程序3.项目评估的内容4.项目评估报告内容大纲记忆要点总结7.3项目评估与决策 项目评估指在项目可行性研究的基础上,由第三方(国家、银行或有关机构)根据国家颁布的政策、法规、方法、参数和条例等,从国民经济…

Java | Leetcode Java题解之第77题组合

题目&#xff1a; 题解&#xff1a; class Solution {List<Integer> temp new ArrayList<Integer>();List<List<Integer>> ans new ArrayList<List<Integer>>();public List<List<Integer>> combine(int n, int k) {List&l…

[Spring Cloud] (7)gateway防重放拦截器

文章目录 简述本文涉及代码已开源Fir Cloud 完整项目防重放防重放必要性&#xff1a;防重放机制作用&#xff1a; 整体效果后端进行处理 后端增加防重放开关配置签名密钥 工具类防重放拦截器 前端被防重放拦截增加防重放开关配置请求头增加防重放签名处理防重放验证处理函数bas…

信息系统项目管理师0104:详细可行性研究(7项目立项管理—7.2项目可行性研究—7.2.3详细可行性研究)

点击查看专栏目录 文章目录 7.2.3详细可行性研究1.详细可行性研究的依据2.详细可行性研究的原则3.详细可行性研究的方法4.详细可行性研究的内容5.详细可行性研究报告记忆要点总结7.2.3详细可行性研究 详细可行性研究是在项目决策前对与项目有关的技术、经济、