记录常用的es 查询 聚合

GET _cat / indices

GET / p_ext_develop / _mapping / g

GET / p_ext_develop / _analyze {
"field": "other_name_en",
"text": "(3S)-N-Boc-2-azabicyclo[2.2.1]heptane-3-carboxylicacid;"
}

GET / hs2840 / _analyze {
"query": {
"term": {
"cas": {
"value": "29173500"
}
},
"range": {
"exportmonth": {
"from": "2018-01",
"to": "2018-12"
}
}
}
}

GET / p_ext_develop / g / _search {
"query": {
"constant_score": {
"filter": {
"term": {
"products_name_en.text": "Benzoic Acid"
}
},
"boost": 1.2
}
}
}

GET / p_ext_develop / g / _search {
"query": {
"filtered": {
"filter": {
"bool": {
"should": [{
"term": {
"other_name_en": "acid"
}
}]
}
}
}
}
}

#
DELETE / p_ext_develop
GET / p_ext_develop / g / _search {
"size": 300,
"query": {
"function_score": {
"query": {
"bool": {
"should": [{
"query_string": {
"fields": ["products_name_en", "other_name_en"],
"query": "Benzoic acid"
}
},
{
"term": {
"delflag": "0"
}
}
]
}
},
"functions": [{
"filter": {
"term": {
"products_name_en": "Benzoic acid"
}
},
"weight": 15
},
{
"filter": {
"regexp": {
"products_name_en": "[Bb]enzoic [Aa]cid"
}
},
"weight": 13
},
{
"filter": {
"regexp": {
"products_name_en": "[Bb]enzoic [Aa]cid.*"
}
},
"weight": 12
},
{
"filter": {
"term": {
"other_name_en": "Benzoic acid"
}
},
"weight": 10
},
{
"filter": {
"regexp": {
"other_name_en": "[Bb]enzoic [Aa]cid"
}
},
"weight": 8
},
{
"filter": {
"regexp": {
"other_name_en": "[Bb]enzoic [Aa]cid.*"
}
},
"weight": 7
},
{
"filter": {
"query_string": {
"fields": ["products_name_en"],
"query": "Benzoic acid"
}
},
"weight": 2
}
]
}
},
"sort": [{
"_score": {
"order": "desc"
}
},
{
"supplier_count": {
"order": "desc"
}
}
]
}

GET / p_ext_develop / g / _search {
"query": {
"function_score": {
"query": {
"match_all": {}
},
"functions": [{
"filter": {
"term": {
"products_name_en.text": "[Bb]enzoic [Aa]cid"
}
},
"weight": 30
},
{
"filter": {
"prefix": {
"products_name_en.text": "Benzoic Acid"
}
},
"weight": 29
},
{
"filter": {
"query": {
"wildcard": {
"products_name_en.text": {
"value": "Benzoic Acid"
}
}
}
},
"weight": 28
},
{
"filter": {
"term": {
"other_name_en.text": "Benzoic Acid"
}
},
"weight": 27
},
{
"filter": {
"prefix": {
"other_name_en.text": "Benzoic Acid"
}
},
"weight": 26
},
{
"filter": {
"query": {
"wildcard": {
"other_name_en.text": {
"value": "Benzoic Acid"
}
}
}
},
"weight": 25
}
]
}
}
}

GET / p_ext_develop / g / _search {
"size": 300,
"query": {
"function_score": {
"query": {
"bool": {
"must": [{
"query_string": {
"fields": ["products_name_en", "other_name_en"],
"query": "Benzoic acid"
}
},
{
"term": {
"delflag": "0"
}
}
]
}
},
"functions": [{
"filter": {
"term": {
"products_name_en.text": "Benzoic acid"
}
},
"weight": 15
},
{
"filter": {
"regexp": {
"products_name_en.text": "[Bb]enzoic [Aa]cid"
}
},
"weight": 13
},
{
"filter": {
"regexp": {
"products_name_en.text": "[Bb]enzoic [Aa]cid.*"
}
},
"weight": 12
},
{
"filter": {
"term": {
"other_name_en.text": "Benzoic acid"
}
},
"weight": 10
},
{
"filter": {
"regexp": {
"other_name_en.text": "[Bb]enzoic [Aa]cid"
}
},
"weight": 8
},
{
"filter": {
"regexp": {
"other_name_en.text": "[Bb]enzoic [Aa]cid.*"
}
},
"weight": 7
},
{
"filter": {
"query_string": {
"fields": ["products_name_en"],
"query": "Benzoic acid"
}
},
"weight": 2
}
]
}
},
"sort": [{
"_score": {
"order": "desc"
}
},
{
"supplier_count": {
"order": "desc"
}
}
]
}

PUT / p_ext_develop {
"mappings": {
"g": {
"properties": {
"application": {
"type": "string"
},
"cas_no": {
"type": "string",
"index": "not_analyzed"
},
"delflag": {
"type": "string"
},
"other_name_en": {
"type": "string",
"fields": {
"text": {
"type": "string",
"index": "not_analyzed"
}
}
},
"other_name_zh": {
"type": "string",
"fields": {
"text": {
"type": "string",
"index": "not_analyzed"
}
},
"analyzer": "ik"
},
"pid": {
"type": "string"
},
"products_name_en": {
"type": "string",
"fields": {
"text": {
"type": "string",
"index": "not_analyzed"
}
}
},
"products_name_zh": {
"type": "string",
"fields": {
"text": {
"type": "string",
"index": "not_analyzed"
}
},
"analyzer": "ik"
},
"supplier_count": {
"type": "string"
}
}
}
}
}

GET / p_ext_develop / g / _mapping

GET / p_ext_develop / g / _search {
"query": {
"match_all": {}
}
}

GET / p_ext_develop / g / _search {
"query": {
"match": {
"pid": "pd18051825563"
}
}
}

GET / p_ext_develop / g / _search {
"size": 300,
"query": {
"constant_score": {
"filter": {
"bool": {
"must": [{
"term": {
"delflag": "0"
}
},
{
"term": {
"cas_no": {
"value": "75-05-8"
}
}
}
]
}
}
}
},
"sort": [{
"supplier_count": {
"order": "desc"
}
}]
}

#
country_short country_name city_name city_short external post_code

DELETE / jerry_data

GET jerry_data / index / _mapping
#7261, 2231 3741 1425
GET /jerry_data/index/_search
{
"size": 10000,
"query": {
"constant_score": {
"filter": {
"bool": {
"must": [{
"match": {
"country_short": "CA"
}
},
{
"bool": {
"should": [{
"prefix": {
"city_name": {
"value": "AIR"
}
}
}, {
"prefix": {
"post_code": {
"value": "AIR"
}
}
}]
}
}
]
}
}
}
},
"sort": [{ "city_name": { "order": "desc" }},
{ "post_code": { "order": "asc" }}
]
}

GET /jerry_data/index/_search
{
"size": 10000,
"query": {
"constant_score": {
"filter": {
"bool": {
"should": [{
"regexp": {
"country_short": "AIR.*"
}
}, {
"regexp": {
"city_name": "AIR.*"
}
},
{
"regexp": {
"city_short": "AIR.*"
}
}
]
}
}
}
}
}

PUT /jerry_data
{
"mappings": {
"index":{
"properties": {
"country_short": {
"type": "string",
"index": "not_analyzed"
},
"country_name": {
"index": "not_analyzed",
"type": "string"
},
"city_name": {
"type": "string",
"index": "not_analyzed"
},
"city_short": {
"type": "string",
"index": "not_analyzed"
},
"external": {
"type": "string",
"index": "not_analyzed"
},

"post_code": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}

GET /hs2840/index/_search
{
"query": {
"term": {
"country_code": {
"value": "tt"
}
}
}
}

GET /hs2840/index/_search
{
"query": {
"match_all": {}
}
}

GET /cars/transactions/_search
{
"size": 0,
"query": {
"match_all": {}
},
"aggs": {
"colors": {
"terms": {
"field": "color"
}
}
}
}
# 查询统计
GET / cars / transactions / _search {
"query": {
"match": {
"make": "ford"
}
},
"aggs": {
"colors": {
"terms": {
"field": "color"
}
}
}
}

GET / cars / transactions / _search {
"size": 0,
"query": {
"match": {
"make": "ford"
}
},
"aggs": {
"single_avg_price": {
"avg": {
"field": "price"
}
},
"all": {
"global": {},
"aggs": {
"avg_price": {
"avg": {
"field": "price"
}
}
}
}
}
}

GET / cars / transactions / _search {
"size": 0,
"query": {
"constant_score": {
"filter": {
"range": {
"price": {
"gte": 10000
}
}
}
}
},
"aggs": {
"single_avg_price": {
"avg": {
"field": "price"
}
}
}

}

GET / cars / transactions / _search {
"size": 0,
"query": {
"match": {
"make": "ford"
}
},
"aggs": {
"recent_sales": {
"filter": {
"range": {
"sold": {
"from": "now-1M"
}
}
},
"aggs": {
"average_price": {
"avg": {
"field": "price"
}
}
}
}
}

}

GET / cars / transactions / _search {
"size": 0,
"aggs": {
"distinct_colors": {
"cardinality": {
"field": "color"
}
}
}
}

GET / cars / transactions / _search {
"size": 0,
"aggs": {
"months": {
"date_histogram": {
"field": "sold",
"format": "yyyy-MM-dd",
"interval": "month",
"min_doc_count": 0,
"extended_bounds": {
"min": "2014-01-01",
"max": "2015-12-31"
}
},
"aggs": {
"distinct_colors": {
"cardinality": {
"field": "color"
}
}
}
}
}
}

GET / cars / transactions / _search {
"size": 0,
"query": {
"match": {
"make": "ford"
}
},
"post_filter": {
"term": {
"color": "green"
}
},
"aggs": {
"all_colors": {
"terms": {
"field": "color"
}
}
}

}

#
尝试尝试尝试juhe尝试尝试聚合
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"popular_colors": {
"terms": {
"field": "color",
"size": 50
},
"aggs": {
"avg_price": {
"avg": {
"field": "price"
}
},
"make": {
"terms": {
"field": "make",
"size": 10
},
"aggs": {
"min_price": {
"min": {
"field": "price"
}
},
"max_price": {
"max": {
"field": "price"
}
}
}
}
}
}
}
}

#
图表图表图表
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"price": {
"histogram": {
"field": "price",
"interval": 20000
},
"aggs": {
"revenue": {
"sum": {
"field": "price"
}
}
}
}
}
}

GET / cars / transactions / _search {
"size": 0,
"aggs": {
"sales": {
"date_histogram": {
"field": "sold",
"interval": "quarter",
"format": "yyyy-MM-dd",
"min_doc_count": 0,
"extended_bounds": {
"min": "2014-01-01",
"max": "2014-12-31"
}
},
"aggs": {
"per_make_sum": {
"terms": {
"field": "make"
},
"aggs": {
"sum_price": {
"sum": {
"field": "price"
}
}
}
},
"total_sum": {
"sum": {
"field": "price"
}
}
}
}
}
}

GET / hs2840 / index / _search {
"size": 0,
"aggs": {
"price_count": {
"terms": {
"size": 300,
"field": "month"
},
"aggs": {
"avg_qty": {
"avg": {
"field": "JSON_qty"
}
},
"country_zh": {
"terms": {
"size": 300,
"field": "country_zh"
},
"aggs": {
"max_qty": {
"min": {
"field": "JSON_qty"
}
},
"min_qty": {
"max": {
"field": "JSON_qty"
}
}
}
},
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
}
}
}
}
}

GET / hs2840 / index / _search {
"query": {
"term": {
"cas": {
"value": "29053200"
}
}
}
}

GET / hs2840 / index / _search {
"query": {
"filtered": {
"query": {
"term": {
"cas": {
"value": "29053200"
}
}
},
"filter": {
"range": {
"exportmonth": {
"gte": "2018-01",
"lte": "2018-12"
}
}
}
}
}
}

#
2

GET / hs2840 / index / _search {
"query": {
"term": {
"country_code": {
"value": "ar"
}
}
}
}

#
月份的max and min
GET / hs2840 / index / _search {
"size": 0,
"aggs": {
"max_month": {
"max": {
"field": "exportmonth",
"format": "yyyy-MM"
}
},
"min_month": {
"min": {
"field": "exportmonth",
"format": "yyyy-MM"
}
}
}
}#
接口2
GET / hs2840 / index / _search {
"size": 10000,
"query": {
"term": {
"cas": {
"value": "29171400"
}
}
},
"aggs": {
"fromdata": {
"filter": {
"and": [{
"range": {
"exportmonth": {
"from": "2018-01",
"to": "2018-12"
}
}
}]
},
"aggs": {
"summonth": {
"date_histogram": {
"field": "exportmonth",
"interval": "month",
"format": "yyyy-MM",
"min_doc_count": 0,
"order": {
"_key": "desc"
}
}
}
}
}
}

}

GET / hs2840 / index / _search {
"query": {
"range": {
"exportmonth": {
"from": "2018-06",
"to": "2018-07"
}
}
}
}
GET / hs2840 / index / _search {
"size": 10000,
"query": {
"bool": {
"must": [{
"term": {
"cas": {
"value": "29053200"
}
}
}],
"filter": {
"range": {
"exportmonth": {
"gte": "2018-01",
"lte": "2018-12"
}
}
}
}
}
}

GET / hs2840 / index / _search {
"size": 5000,
"query": {
"term": {
"cas": {
"value": "31054000"
}
}
},
"aggs": {
"summonth": {
"date_histogram": {
"field": "exportmonth",
"interval": "month",
"format": "yyyy-MM",
"min_doc_count": 0,
"extended_bounds": {
"min": "2018-01",
"max": "2018-10"
},
"order": {
"_key": "desc"
}
},
"aggs": {
"datefrom": {
"filter": {
"range": {
"exportmonth": {
"from": "2018-01",
"to": "2018-12",
"format": "yyyy-MM"
}
}
},
"aggs": {
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}
}
}

#
接口3验证
GET / hs2840 / index / _search {
"size": 0,
"aggs": {
"total_qty": {
"sum": {
"field": "JSON_qty"
}
},
"total_price": {
"sum": {
"field": "JSON_price"
}
}
}
}

#
接口3
GET / hs2840 / index / _search {
"size": 0,
"aggs": {
"all": {
"global": {},
"aggs": {
"total_qty": {
"sum": {
"field": "JSON_qty"
}
},
"total_price": {
"sum": {
"field": "JSON_price"
}
}
}
},
"bydate": {
"filter": {
"range": {
"exportmonth": {
"gte": "2018-01",
"lte": "2018-12"
}
}
},
"aggs": {
"bycoutry": {
"terms": {
"field": "country_code",
"size": 10,
"order": {
"sum_qty": "desc"
}
},
"aggs": {
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}
}
}

GET / hs2840 / index / _search {
"size": 0,
"aggs": {
"bycountry": {
"terms": {
"field": "country_code",
"size": 300
},
"aggs": {
"bydate": {
"filter": {
"range": {
"exportmonth": {
"gte": "2018-01",
"lte": "2018-12"
}
}
},
"aggs": {
"bymnth": {
"date_histogram": {
"field": "exportmonth",
"interval": "month",
"format": "yyyy-MM",
"min_doc_count": 0,
"extended_bounds": {
"min": "2018-01",
"max": "2018-12"
},
"order": {
"sum_qty": "desc"
}
},
"aggs": {
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}

}
}
}
}
}
}

GET / hs2840 / index / _search {
"size": 0,
"aggs": {
"bycountry": {
"terms": {
"field": "country_code",
"size": 300,
"order": {
"sum_qyt": "desc"
}
},
"aggs": {
"sum_qyt": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}

GET / hs2840 / index / _search {
"size": 10000,
"query": {
"term": {
"cas": {
"value": "29173500"
}
}
},
"aggs": {
"bymonth": {
"date_histogram": {
"field": "exportmonth",
"interval": "month",
"format": "yyyy-MM",
"min_doc_count": 0,
"extended_bounds": {
"min": "2019-01",
"max": "2019-06"
},
"order": {
"_key": "desc"
}
},
"aggs": {
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}#
hscode 和时间
GET / hs2840 / index / _search {
"size": 10000,
"query": {
"term": {
"cas": "29173500"
},
"filtered": {
"filter": {
"range": {
"exportmonth": {
"gte": "2019-01",
"lte": "2019-12"
}
}
}
}
},
"aggs": {
"bymonth": {
"filter": {
"range": {
"exportmonth": {
"gte": "2019-01",
"lte": "2019-07"
}
}
},
"aggs": {
"datelist": {
"date_histogram": {
"field": "exportmonth",
"interval": "month",
"format": "yyyy-MM",
"min_doc_count": 0,
"extended_bounds": {
"min": "2019-01",
"max": "2019-12"
},
"order": {
"_key": "desc"
}
},
"aggs": {
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}
}
}

#
接口1
GET / hs2840 / index / _search {
"size": 0,
"query": {
"term": {
"country_code": {
"value": "ar"
}
}
},
"aggs": {
"summonth": {
"filter": {
"range": {
"exportmonth": {
"gte": "2017-01",
"lte": "2017-12"
}
}
},
"aggs": {
"data_month": {
"date_histogram": {
"field": "exportmonth",
"interval": "month",
"format": "yyyy-MM",
"min_doc_count": 0,
"extended_bounds": {
"min": "2017-01",
"max": "2017-12"
},
"order": {
"_key": "desc"
}
},
"aggs": {
"sum_qty": {
"sum": {
"field": "JSON_qty"
}
},
"sum_price": {
"sum": {
"field": "JSON_price"
}
}
}
}
}
}
}
}

#
3

# Delete the `cars`
index
DELETE / cars

# Index example docs
POST / cars / transactions / _bulk {
"index": {}
} {
"price": 10000,
"color": "red",
"make": "honda",
"sold": "2014-10-28"
} {
"index": {}
} {
"price": 20000,
"color": "red",
"make": "honda",
"sold": "2014-11-05"
} {
"index": {}
} {
"price": 30000,
"color": "green",
"make": "ford",
"sold": "2014-05-18"
} {
"index": {}
} {
"price": 15000,
"color": "blue",
"make": "toyota",
"sold": "2014-07-02"
} {
"index": {}
} {
"price": 12000,
"color": "green",
"make": "toyota",
"sold": "2014-08-19"
} {
"index": {}
} {
"price": 20000,
"color": "red",
"make": "honda",
"sold": "2014-11-05"
} {
"index": {}
} {
"price": 80000,
"color": "red",
"make": "bmw",
"sold": "2014-01-01"
} {
"index": {}
} {
"price": 25000,
"color": "blue",
"make": "ford",
"sold": "2014-02-12"
}

#
Basic aggregation - most popular car colors
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"popular_colors": {
"terms": {
"field": "color"
}
}
}
}

#
Find the average price of each car color
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"colors": {
"terms": {
"field": "color"
},
"aggs": {
"avg_price": {
"avg": {
"field": "price"
}
}
}
}
}
}

#
Nest a second bucket to determine top makes per color
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"colors": {
"terms": {
"field": "color"
},
"aggs": {
"avg_price": {
"avg": {
"field": "price"
}
},
"make": {
"terms": {
"field": "make"
}
}
}
}
}
}

GET / cars / transactions / _search {
"size": 0,
"query": {
"match": {
"make": "ford"
}
},
"aggs": {
"recent_sales": {
"filter": {
"range": {
"sold": {
"from": "now-60M"
}
}
},
"aggs": {
"average_price": {
"avg": {
"field": "price"
}
}
}
}
}
}

#
Finally, add some extra metrics to determine min / max price per - make, per - color
GET / cars / transactions / _search {
"size": 0,
"aggs": {
"colors": {
"terms": {
"field": "color"
},
"aggs": {
"avg_price": {
"avg": {
"field": "price"
}
},
"make": {
"terms": {
"field": "make"
},
"aggs": {
"min_price": {
"min": {
"field": "price"
}
},
"max_price": {
"max": {
"field": "price"
}
}
}
}
}
}
}
}

ES查询语句的更多相关文章

  1. Func<T,T>应用之Elasticsearch查询语句构造器的开发

    前言 之前项目中做Elasticsearch相关开发的时候,虽然借助了第三方的组件PlainElastic.Net,但是由于当时不熟悉用法,而选择了自己拼接查询语句.例如: string queryG ...

  2. elasticsearch查询语句

    1,安装es 安装java环境 # java --versionjava version "1.8.0_65" Java(TM) SE Runtime Environment (b ...

  3. SpringBoot使用注解的方式构建Elasticsearch查询语句,实现多条件的复杂查询

    背景&痛点 通过ES进行查询,如果需要新增查询条件,则每次都需要进行硬编码,然后实现对应的查询功能.这样不仅开发工作量大,而且如果有多个不同的索引对象需要进行同样的查询,则需要开发多次,代码复 ...

  4. ES 常用的查询语句介绍

    elasticsearch定义了两种查询方式: 一.索引(index).type.document 相关语句 1.列出所有索引的状态 GET /_cat/indices?v health status ...

  5. ES查询之刨根问底

    昨天有一个需求,就是想要根据某个网关url做过滤,获取其下面所有的上下文nginx日志:如果直接"query":"https://XXX/YYY/ZZZ"发现有 ...

  6. ElasticSearch 论坛搜索查询语句

    概述 研究论坛搜索如何综合时间和TF/IDF权重. 自定义权重计算的效率问题 数据结构 假设有一个论坛的搜索 字段包括: subject:标题 message:内容 dateline:发布时间 tag ...

  7. Neo4j:图数据库GraphDB(一)入门和基本查询语句

    图数据库的代表:Neo4j 官网:  http://neo4j.com/ 引言:为什么使用图数据库 在很多新型项目中,应用图数据库已经是势在必行的趋势了,因为图数据库可以很好的表示各种节点与关系的概念 ...

  8. mysql查询语句中使用星号真的慢的要死?

    前言 之所以写这篇文章,是源于以前看过的关于sql语句优化的帖子,里面明确提到了在sql语句中不要使用 * 来做查询,就像下面的规则中说的 2.尽量避免使用select *,返回无用的字段会降低查询效 ...

  9. python 配合 es 查询数据

    1.python脚本 [root@do1cloud03 ~]# cat python-es.py #!/usr/bin/env python3 from elasticsearch import El ...

随机推荐

  1. js匿名函数确实是个好东西

    <body onload="alert('http://www.baidu.com/');"> <script type="text/javascrip ...

  2. Spring Aop(五)——给Advice传参

    转发:https://www.iteye.com/blog/elim-2395337 5 给Advice传递参数 Advice除了可以接收JoinPoint(非Around Advice)或Proce ...

  3. 【文章存档】Local Git 如何部署分支

    又来存档文章了,链接 https://docs.azure.cn/zh-cn/articles/azure-operations-guide/app-service-web/aog-app-servi ...

  4. 《剑指offer》Q13-18 (牛客10.13)

    目录 Q13 调整数组顺序使奇数位于偶数前 Q14 链表中倒数第k个结点 Q15 反转链表 Q16 合并两个有序链表 Q17 树的子结构 Q18 二叉树的镜像 Q13 调整数组顺序使奇数位于偶数前 输 ...

  5. centos7服务搭建常用服务配置之一:SSH

    目录 1 SSH服务协议 1.1 ssh服务协议说明 1.2 ssh服务工作机制 1.3 ssh加密技术说明 1.3.1 ssh实现安全链接建立,利用要是和锁头 1.3.2 ssh加密算法 1.4 s ...

  6. Spring mybatis源码篇章-动态SQL基础语法以及原理

    通过阅读源码对实现机制进行了解有利于陶冶情操,承接前文Spring mybatis源码篇章-Mybatis的XML文件加载 前话 前文通过Spring中配置mapperLocations属性来进行对m ...

  7. Pebbles HDU 2167

    Pebbles HDU 2167 大意:给定一个N*N的方格,让你在里面取出一些数使其和最大,要求每一个数不能与其相邻的8个数同时取出. 思路:和炮兵阵地那一题有点像,但我们只需要考虑上一行的情况,这 ...

  8. 剑指offer34:第一个只出现一次的字符的位置

    1 题目描述 在一个字符串(0<=字符串长度<=10000,全部由字母组成)中找到第一个只出现一次的字符,并返回它的位置, 如果没有则返回 -1(需要区分大小写). 2 思路和方法 ch[ ...

  9. 用pandas库对csv文件中的文本数据进行分析处理

    #数据分析 import pandas import csv old_path = r'd:\2000W\200W-400W.csv' f = open(old_path,'r',encoding=' ...

  10. prometheus-常用资源对象

    监控 Kubernetes 常用资源对象 Prometheus 来自动发现 Kubernetes 集群的节点,用到了 Prometheus 针对 Kubernetes 的服务发现机制kubernete ...