本文基于ES6.4版本,我也是出于学习阶段,对学习内容做个记录,如果文中有错误,请指出。

实验数据:

index:book

type:novel

mappings:

  1. {
  2. "mappings": {
  3. "novel": {
  4. "dynamic": "false",
  5. "properties": {
  6. "word_count": {
  7. "type": "integer"
  8. },
  9. "author": {
  10. "type": "keyword"
  11. },
  12. "title": {
  13. "type": "text"
  14. },
  15. "publish_date": {
  16. "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis",
  17. "type": "date"
  18. }
  19. }
  20. }
  21. }
  22. }

通过put创建索引,使用head可视化界面,数据如下:

Elasticsearch的查询分为:

1、子条件查询:查询特定字段的特定值

Query context

查询过程中,除了判断Document是否满足条件,还会计算出_score表示匹配程度,数值越大,证明匹配程度越高

1、查询全部:/book/novel/_search

  1. "hits": {
  2. "total": 10,
  3. "max_score": 1.0,
  4. "hits": [
  5. {
  6. "_index": "book",
  7. "_type": "novel",
  8. "_id": "5",
  9. "_score": 1.0,
  10. "_source": {
  11. "title": "永夜君王",
  12. "word_count": "110000",
  13. "publish_date": "2015-03-01",
  14. "author": "烟雨江南"
  15. }
  16. },
  17. {
  18. "_index": "book",
  19. "_type": "novel",
  20. "_id": "8",
  21. "_score": 1.0,
  22. "_source": {
  23. "title": "万古令",
  24. "word_count": "110000",
  25. "publish_date": "2015-03-01",
  26. "author": "听奕"
  27. }
  28. },
  29. {
  30. "_index": "book",
  31. "_type": "novel",
  32. "_id": "9",
  33. "_score": 1.0,
  34. "_source": {
  35. "title": "天帝传",
  36. "word_count": "110000",
  37. "publish_date": "2015-03-01",
  38. "author": "飞天鱼"
  39. }
  40. },
  41. {
  42. "_index": "book",
  43. "_type": "novel",
  44. "_id": "10",
  45. "_score": 1.0,
  46. "_source": {
  47. "title": "剑来",
  48. "word_count": "110000",
  49. "publish_date": "2015-03-01",
  50. "author": "烽火戏诸侯"
  51. }
  52. },
  53. {
  54. "_index": "book",
  55. "_type": "novel",
  56. "_id": "2",
  57. "_score": 1.0,
  58. "_source": {
  59. "title": "完美世界",
  60. "word_count": "130000",
  61. "publish_date": "2017-03-01",
  62. "author": "辰东"
  63. }
  64. },
  65. {
  66. "_index": "book",
  67. "_type": "novel",
  68. "_id": "4",
  69. "_score": 1.0,
  70. "_source": {
  71. "title": "民国谍影",
  72. "word_count": "110000",
  73. "publish_date": "2019-03-01",
  74. "author": "寻青藤"
  75. }
  76. },
  77. {
  78. "_index": "book",
  79. "_type": "novel",
  80. "_id": "6",
  81. "_score": 1.0,
  82. "_source": {
  83. "title": "遮天",
  84. "word_count": "110000",
  85. "publish_date": "2015-03-01",
  86. "author": "辰东"
  87. }
  88. },
  89. {
  90. "_index": "book",
  91. "_type": "novel",
  92. "_id": "1",
  93. "_score": 1.0,
  94. "_source": {
  95. "title": "万古神帝",
  96. "word_count": "30000",
  97. "publish_date": "2017-01-01",
  98. "author": "飞天鱼"
  99. }
  100. },
  101. {
  102. "_index": "book",
  103. "_type": "novel",
  104. "_id": "7",
  105. "_score": 1.0,
  106. "_source": {
  107. "title": "圣墟",
  108. "word_count": "110000",
  109. "publish_date": "2015-03-01",
  110. "author": "辰东"
  111. }
  112. },
  113. {
  114. "_index": "book",
  115. "_type": "novel",
  116. "_id": "3",
  117. "_score": 1.0,
  118. "_source": {
  119. "title": "星辰变",
  120. "word_count": "100000",
  121. "publish_date": "2018-03-01",
  122. "author": "我吃西红柿"
  123. }
  124. }
  125. ]
  126. }

2、查询id为1的数据:/book/novel/1

  1. {
  2. "_index": "book",
  3. "_type": "novel",
  4. "_id": "1",
  5. "_version": 1,
  6. "found": true,
  7. "_source": {
  8. "title": "万古神帝",
  9. "word_count": "30000",
  10. "publish_date": "2017-01-01",
  11. "author": "飞天鱼"
  12. }
  13. }

3、只查询title和author字段:/1?_source=title,author

  1. {
  2. "_index": "book",
  3. "_type": "novel",
  4. "_id": "1",
  5. "_version": 1,
  6. "found": true,
  7. "_source": {
  8. "author": "飞天鱼",
  9. "title": "万古神帝"
  10. }
  11. }

4、只是显示_source部分:/book/novel/1/_source

  1. {
  2. "title": "万古神帝",
  3. "word_count": "30000",
  4. "publish_date": "2017-01-01",
  5. "author": "飞天鱼"
  6. }

5、筛选单字段查询:/book/novel/_search

  1. {
  2. "query": {
  3. "match": {
  4. "author": "飞天鱼"
  5. }
  6. }
  7. }
  1. "hits": {
  2. "total": 2,
  3. "max_score": 1.2039728,
  4. "hits": [
  5. {
  6. "_index": "book",
  7. "_type": "novel",
  8. "_id": "9",
  9. "_score": 1.2039728,
  10. "_source": {
  11. "title": "天帝传",
  12. "word_count": "110000",
  13. "publish_date": "2015-03-01",
  14. "author": "飞天鱼"
  15. }
  16. },
  17. {
  18. "_index": "book",
  19. "_type": "novel",
  20. "_id": "1",
  21. "_score": 0.6931472,
  22. "_source": {
  23. "title": "万古神帝",
  24. "word_count": "30000",
  25. "publish_date": "2017-01-01",
  26. "author": "飞天鱼"
  27. }
  28. }
  29. ]
  30. }

6、limit:我们查询到2条数据,如果我们只想得到第一条数据,可以使用from和size联合查询

  1. {
  2. "query": {
  3. "match": {
  4. "author": "飞天鱼"
  5. }
  6. },
  7. "from": 0,
  8. "size": 1
  9. }
  1. "hits": {
  2. "total": 2,
  3. "max_score": 1.2039728,
  4. "hits": [
  5. {
  6. "_index": "book",
  7. "_type": "novel",
  8. "_id": "9",
  9. "_score": 1.2039728,
  10. "_source": {
  11. "title": "天帝传",
  12. "word_count": "110000",
  13. "publish_date": "2015-03-01",
  14. "author": "飞天鱼"
  15. }
  16. }
  17. ]
  18. }
hits.total=2,但是只返回了第一条数据,from为从第几条开始,size我返回的条数
7、order by
这里选择对word_count字段进行倒叙排序
  1. {
  2. "query": {
  3. "match": {
  4. "author": "辰东"
  5. }
  6. },
  7. "sort": [
  8. {
  9. "word_count": {
  10. "order": "desc"
  11. }
  12. }
  13. ]
  14. }
  1. "hits": {
  2. "total": 3,
  3. "max_score": null,
  4. "hits": [
  5. {
  6. "_index": "book",
  7. "_type": "novel",
  8. "_id": "2",
  9. "_score": null,
  10. "_source": {
  11. "title": "完美世界",
  12. "word_count": "130000",
  13. "publish_date": "2017-03-01",
  14. "author": "辰东"
  15. },
  16. "sort": [
  17. 130000
  18. ]
  19. },
  20. {
  21. "_index": "book",
  22. "_type": "novel",
  23. "_id": "6",
  24. "_score": null,
  25. "_source": {
  26. "title": "遮天",
  27. "word_count": "110000",
  28. "publish_date": "2015-03-01",
  29. "author": "辰东"
  30. },
  31. "sort": [
  32. 110000
  33. ]
  34. },
  35. {
  36. "_index": "book",
  37. "_type": "novel",
  38. "_id": "7",
  39. "_score": null,
  40. "_source": {
  41. "title": "圣墟",
  42. "word_count": "110000",
  43. "publish_date": "2015-03-01",
  44. "author": "辰东"
  45. },
  46. "sort": [
  47. 110000
  48. ]
  49. }
  50. ]
  51. }

8、其余匹配match_phrase

query、match的方式本质上就是模糊查询,而且中文会自动分词到最大粒度,可以看到会查询到只要匹配任意一个字都是可以的

  1. {
  2. "query": {
  3. "match": {
  4. "title": "万古神帝"
  5. }
  6. }
  7. }
  1. "hits": {
  2. "total": 3,
  3. "max_score": 2.439878,
  4. "hits": [
  5. {
  6. "_index": "book",
  7. "_type": "novel",
  8. "_id": "1",
  9. "_score": 2.439878,
  10. "_source": {
  11. "title": "万古神帝",
  12. "word_count": "30000",
  13. "publish_date": "2017-01-01",
  14. "author": "飞天鱼"
  15. }
  16. },
  17. {
  18. "_index": "book",
  19. "_type": "novel",
  20. "_id": "8",
  21. "_score": 2.4079456,
  22. "_source": {
  23. "title": "万古令",
  24. "word_count": "110000",
  25. "publish_date": "2015-03-01",
  26. "author": "听奕"
  27. }
  28. },
  29. {
  30. "_index": "book",
  31. "_type": "novel",
  32. "_id": "9",
  33. "_score": 1.2039728,
  34. "_source": {
  35. "title": "天帝传",
  36. "word_count": "110000",
  37. "publish_date": "2015-03-01",
  38. "author": "飞天鱼"
  39. }
  40. }
  41. ]
  42. }

所以这里有了其余匹配match_phrase,结果只有完全包含"万古神帝"的title才可以被查询到

  1. {
  2. "query": {
  3. "match_phrase": {
  4. "title": "万古神帝"
  5. }
  6. }
  7. }
  1. "hits": {
  2. "total": 1,
  3. "max_score": 2.439878,
  4. "hits": [
  5. {
  6. "_index": "book",
  7. "_type": "novel",
  8. "_id": "1",
  9. "_score": 2.439878,
  10. "_source": {
  11. "title": "万古神帝",
  12. "word_count": "30000",
  13. "publish_date": "2017-01-01",
  14. "author": "飞天鱼"
  15. }
  16. }
  17. ]
  18. }

9、多条件查询multi_match:查询title或者author包含"万古神帝"的数据

  1. {
  2. "query": {
  3. "multi_match": {
  4. "query": "万古神天",
  5. "fields": ["title","author"]
  6. }
  7. }
  8. }
  1. "hits": {
  2. "total": 4,
  3. "max_score": 2.4079456,
  4. "hits": [
  5. {
  6. "_index": "book",
  7. "_type": "novel",
  8. "_id": "8",
  9. "_score": 2.4079456,
  10. "_source": {
  11. "title": "万古令",
  12. "word_count": "110000",
  13. "publish_date": "2015-03-01",
  14. "author": "听奕"
  15. }
  16. },
  17. {
  18. "_index": "book",
  19. "_type": "novel",
  20. "_id": "1",
  21. "_score": 1.8299085,
  22. "_source": {
  23. "title": "万古神帝",
  24. "word_count": "30000",
  25. "publish_date": "2017-01-01",
  26. "author": "飞天鱼"
  27. }
  28. },
  29. {
  30. "_index": "book",
  31. "_type": "novel",
  32. "_id": "9",
  33. "_score": 1.2039728,
  34. "_source": {
  35. "title": "天帝传",
  36. "word_count": "110000",
  37. "publish_date": "2015-03-01",
  38. "author": "飞天鱼"
  39. }
  40. },
  41. {
  42. "_index": "book",
  43. "_type": "novel",
  44. "_id": "6",
  45. "_score": 1.1727304,
  46. "_source": {
  47. "title": "遮天",
  48. "word_count": "110000",
  49. "publish_date": "2015-03-01",
  50. "author": "辰东"
  51. }
  52. }
  53. ]
  54. }

10、语法查询query_string

  1. {
  2. "query": {
  3. "query_string": {
  4. "query": "万古"
  5. }
  6. }
  7. }

这里和match没有区别,query可以使用AND和OR,match的filed也可以,注意这里一定是大写,小写就被当做搜索的内容了

  1. {
  2. "query": {
  3. "query_string": {
  4. "query": "万古 OR 剑来"
  5. }
  6. }
  7. }
  1. {
  2. "query": {
  3. "match": {
  4. "title": "万古 OR 剑来"
  5. }
  6. }
  7. }

指定fields:

  1. {
  2. "query": {
  3. "query_string": {
  4. "query": "万古 OR 剑来 OR 辰东 ",
  5. "fields": ["author","title"]
  6. }
  7. }
  8. }

11、精确匹配term

title为text类型,author为keyword类型,实验发现查询title只有是单个字的时候才能匹配(精确匹配查不到数据),而author必须是精确匹配

例如:title不支持精确匹配,支持模糊查询(而且是单个字才可以,多个字照样查不到数据)

  1. {
  2. "query": {
  3. "term": {
  4. "title": "剑来"
  5. }
  6. }
  7. }

如果只是查询一个字就可以

  1. {
  2. "query": {
  3. "term": {
  4. "title": "来"
  5. }
  6. }
  7. }
  1. "hits": {
  2. "total": 1,
  3. "max_score": 1.3940737,
  4. "hits": [
  5. {
  6. "_index": "book",
  7. "_type": "novel",
  8. "_id": "10",
  9. "_score": 1.3940737,
  10. "_source": {
  11. "title": "剑来",
  12. "word_count": "110000",
  13. "publish_date": "2015-03-01",
  14. "author": "烽火戏诸侯"
  15. }
  16. }
  17. ]
  18. }

查询author字段:有三条数据

  1. {
  2. "query": {
  3. "term": {
  4. "author": "辰东"
  5. }
  6. }
  7. }
  1. "hits": [
  2. {
  3. "_index": "book",
  4. "_type": "novel",
  5. "_id": "7",
  6. "_score": 0.6931472,
  7. "_source": {
  8. "title": "圣墟",
  9. "word_count": "110000",
  10. "publish_date": "2015-03-01",
  11. "author": "辰东"
  12. }
  13. },
  14. {
  15. "_index": "book",
  16. "_type": "novel",
  17. "_id": "2",
  18. "_score": 0.47000363,
  19. "_source": {
  20. "title": "完美世界",
  21. "word_count": "130000",
  22. "publish_date": "2017-03-01",
  23. "author": "辰东"
  24. }
  25. },
  26. {
  27. "_index": "book",
  28. "_type": "novel",
  29. "_id": "6",
  30. "_score": 0.47000363,
  31. "_source": {
  32. "title": "遮天",
  33. "word_count": "110000",
  34. "publish_date": "2015-03-01",
  35. "author": "辰东"
  36. }
  37. }
  38. ]
  39. }

author不知道模糊查询:下面结果为null

  1. {
  2. "query": {
  3. "term": {
  4. "author": "东"
  5. }
  6. }
  7. }

12、范围查找range:包括integer和日期类型,日期支持now函数,也就是当前日期

  1. {
  2. "query": {
  3. "range": {
  4. "word_count": {
  5. "gt": 110000,
  6. "lte": 130000
  7. }
  8. }
  9. }
  10. }
  1. "hits": {
  2. "total": 1,
  3. "max_score": 1.0,
  4. "hits": [
  5. {
  6. "_index": "book",
  7. "_type": "novel",
  8. "_id": "2",
  9. "_score": 1.0,
  10. "_source": {
  11. "title": "完美世界",
  12. "word_count": "130000",
  13. "publish_date": "2017-03-01",
  14. "author": "辰东"
  15. }
  16. }
  17. ]
  18. }

Filter context

查询过程中,只是判断Document是否满足条件,只有yes or no。用来做数据过滤,而且ES还会对结果进行缓存,效率相对query更高一点

  1. {
  2. "query": {
  3. "bool": {
  4. "filter": {
  5. "term": {
  6. "word_count": 130000
  7. }
  8. }
  9. }
  10. }
  11. }
  1. "hits": {
  2. "total": 1,
  3. "max_score": 0.0,
  4. "hits": [
  5. {
  6. "_index": "book",
  7. "_type": "novel",
  8. "_id": "2",
  9. "_score": 0.0,
  10. "_source": {
  11. "title": "完美世界",
  12. "word_count": "130000",
  13. "publish_date": "2017-03-01",
  14. "author": "辰东"
  15. }
  16. }
  17. ]
  18. }

2、复合条件查询:组合子条件查询

1、固定分数查询:不支持match,支持filter

  1. {
  2. "query": {
  3. "constant_score": {
  4. "filter": {
  5. "match": {
  6. "title": "天帝传"
  7. }
  8. }
  9. }
  10. }
  11. }
  12.  
  13. {
  14. "query": {
  15. "constant_score": {
  16. "filter": {
  17. "match": {
  18. "title": "天帝传"
  19. }
  20. },
  21. "boost": 2
  22. }
  23. }
  24. }

2、bool查询:

should:就是or的关系

  1. {
  2. "query": {
  3. "bool": {
  4. "should": [
  5. {
  6. "match": {
  7. "author": "辰东"
  8. }
  9. },
  10. {
  11. "match": {
  12. "title": "天帝传"
  13. }
  14. }
  15. ]
  16. }
  17. }
  18. }

must:相当于and

  1. {
  2. "query": {
  3. "bool": {
  4. "must": [
  5. {
  6. "match": {
  7. "author": "辰东"
  8. }
  9. },
  10. {
  11. "match": {
  12. "title": "天帝传"
  13. }
  14. }
  15. ]
  16. }
  17. }
  18. }

must_not:相当于<>

  1. {
  2. "query": {
  3. "bool": {
  4. "must_not": {
  5. "term": {
  6. "author": "辰东"
  7. }
  8. }
  9. }
  10. }
  11. }

bool查询也可以使用filter:

  1. {
  2. "query": {
  3. "bool": {
  4. "must": [
  5. {
  6. "match": {
  7. "author": "辰东"
  8. }
  9. },
  10. {
  11. "match": {
  12. "title": "天帝传"
  13. }
  14. }
  15. ],
  16. "filter": [
  17. {
  18. "term": {
  19. "word_count": 110000
  20. }
  21. }
  22. ]
  23. }
  24. }
  25. }

aggregations:

  1. {
  2. "aggs": {
  3. "group_by_author": {
  4. "terms": {
  5. "field": "author"
  6. }
  7. }
  8. }
  9. }
  1. "aggregations": {
  2. "group_by_author": {
  3. "doc_count_error_upper_bound": 0,
  4. "sum_other_doc_count": 0,
  5. "buckets": [
  6. {
  7. "key": "辰东",
  8. "doc_count": 3
  9. },
  10. {
  11. "key": "飞天鱼",
  12. "doc_count": 2
  13. },
  14. {
  15. "key": "听奕",
  16. "doc_count": 1
  17. },
  18. {
  19. "key": "寻青藤",
  20. "doc_count": 1
  21. },
  22. {
  23. "key": "我吃西红柿",
  24. "doc_count": 1
  25. },
  26. {
  27. "key": "烟雨江南",
  28. "doc_count": 1
  29. },
  30. {
  31. "key": "烽火戏诸侯",
  32. "doc_count": 1
  33. }
  34. ]
  35. }
  36. }

支持多聚合结果:

  1. {
  2. "aggs": {
  3. "group_by_author": {
  4. "terms": {
  5. "field": "author"
  6. }
  7. },
  8. "group_by_word_count": {
  9. "terms": {
  10. "field": "word_count"
  11. }
  12. }
  13. }
  14. }

aggregations除了支持term,还有stats、min、max、avg等

  1. {
  2. "aggs": {
  3. "group_by_author": {
  4. "stats": {
  5. "field": "word_count"
  6. }
  7. }
  8. }
  9. }
  1. "aggregations": {
  2. "group_by_author": {
  3. "count": 10,
  4. "min": 30000.0,
  5. "max": 130000.0,
  6. "avg": 103000.0,
  7. "sum": 1030000.0
  8. }
  9. }

avg:

  1. {
  2. "aggs": {
  3. "group_by_author": {
  4. "avg": {
  5. "field": "word_count"
  6. }
  7. }
  8. }
  9. }

Elasticsearch系列(二)--query、filter、aggregations的更多相关文章

  1. elasticsearch系列二:索引详解(快速入门、索引管理、映射详解、索引别名)

    一.快速入门 1. 查看集群的健康状况 http://localhost:9200/_cat http://localhost:9200/_cat/health?v 说明:v是用来要求在结果中返回表头 ...

  2. Elasticsearch学习笔记(十二)filter与query

    一.keyword 字段和keyword数据类型    1.测试准备数据 POST /forum/article/_bulk { "index": { "_id" ...

  3. WEB API 系列(二) Filter的使用以及执行顺序

    在WEB Api中,引入了面向切面编程(AOP)的思想,在某些特定的位置可以插入特定的Filter进行过程拦截处理.引入了这一机制可以更好地践行DRY(Don’t Repeat Yourself)思想 ...

  4. Web API系列(二) Filter的使用以及执行顺序

    在WEB Api中,引入了面向切面编程(AOP)的思想,在某些特定的位置可以插入特定的Filter进行过程拦截处理.引入了这一机制可以更好地践行DRY(Don’t Repeat Yourself)思想 ...

  5. Elasticsearch系列---常见搜索方式与聚合分析

    概要 本篇主要介绍常见的6种搜索方式.聚合分析语法,基本是上机实战,可以和关系型数据库作对比,如果之前了解关系型数据库,那本篇只需要了解搜索和聚合的语法规则就可以了. 搜索响应报文 以上篇建立的mus ...

  6. Elasticsearch入门教程(六):Elasticsearch查询(二)

    原文:Elasticsearch入门教程(六):Elasticsearch查询(二) 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:h ...

  7. Wireshark入门与进阶系列(二)

    摘自http://blog.csdn.net/howeverpf/article/details/40743705 Wireshark入门与进阶系列(二) “君子生非异也,善假于物也”---荀子 本文 ...

  8. Android高效率编码-第三方SDK详解系列(二)——Bmob后端云开发,实现登录注册,更改资料,修改密码,邮箱验证,上传,下载,推送消息,缩略图加载等功能

    Android高效率编码-第三方SDK详解系列(二)--Bmob后端云开发,实现登录注册,更改资料,修改密码,邮箱验证,上传,下载,推送消息,缩略图加载等功能 我的本意是第二篇写Mob的shareSD ...

  9. 搜索引擎ElasticSearchV5.4.2系列二之ElasticSearchV5.4.2+kibanaV5.4.2+x-packV5.4.2安装

    相关博文: 搜索引擎ElasticSearchV5.4.2系列一之ES介绍 搜索引擎ElasticSearchV5.4.2系列二之ElasticSearchV5.4.2+klanaV5.4.2+x-p ...

随机推荐

  1. MYSQL - database 以及 table 的增删改查

    MYSQL - database 以及 table 的增删改查 MySQL的相关概念介绍 MySQL 为关系型数据库(Relational Database Management System), 这 ...

  2. shiro框架的组成和内部结构(下一篇为spring整合shiro)

    1.shiro简介 Apache Shiro是Java的一个安全框架.功能强大,使用简单的Java安全框架,它为开发人员提供一个直观而全面的认证,授权,加密及会话管理的解决方案. ​ 实际上,Shir ...

  3. CF459E Pashmak and Graph (Dag dp)

    传送门 解题思路 \(dag\)上\(dp\),首先要按照边权排序,然后图都不用建直接\(dp\)就行了.注意边权相等的要一起处理,具体来讲就是要开一个辅助数组\(g[i]\),来避免同层转移. 代码 ...

  4. 如何有效管理Windows系统帐户权限

    权限是Windows管理的基础,当然与Windows用户关系最密切,平时接触最多的是与帐户相关的权限.对于Windows帐户权限的管理,你是否完全了解呢?下面,笔者以Winsows XP为例进行相关测 ...

  5. fatal error U1087: cannot have : and :: dependents for same target Stop.

    转自VC错误:http://www.vcerror.com/?p=72 问题描述: 完成后编译,发现有错误  D:\WinDDK\7600.16385.1\bin\makefile.new(7117) ...

  6. System.Math.cs

    ylbtech-System.Math.cs 1. 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c56193 ...

  7. play framework 从环境搭建到简单运行

    download 官网:https://www.playframework.com/ 将zip下载至本地,进行unzip. 环境变量 检测是否安装成功:解压成功后进入解压的目录,运行 play 终端显 ...

  8. <a>标签的SEO优化细节

    <a>标签的SEO优化细节 如果需要在新窗口中打开链接,我们使用的方法是在a上加上taget=“_blank”,但很多人不知道这是不符合w3c的规范的,在使用严格的DOCTYPE(xhtm ...

  9. Java之RabbitMQ(一)与SpringBoot整合

    应用场景:异步处理.应用解耦.流量削峰 参照:https://blog.csdn.net/weixin_38364973/article/details/82834348 开端 RabbitAutoC ...

  10. html自定义分页

    public class MyPager { /// <summary> /// 每一页数据的条数 /// </summary> public int PageSize { g ...