当前位置: 首页 > news >正文

虚拟主机服务优化关键词排名seo软件

虚拟主机服务,优化关键词排名seo软件,想学做网站 应该学,做建筑看那些网站目录 1:查询总数2:查询所有数据3:查询指定条数4:根据ID查询5:一个查询字符串搜索6:match搜索7:term搜索8:bool搜索9:must多条件匹配查询10:Should满足一个条件查询11: must_not必须不匹配查询12:多个字段查询内容13:一个字段查询多个内容14:通配符和正则匹配15:前缀查询16:短语…

目录

  • 1:查询总数
  • 2:查询所有数据
  • 3:查询指定条数
  • 4:根据ID查询
  • 5:一个查询字符串搜索
  • 6:match搜索
  • 7:term搜索
  • 8:bool搜索
  • 9:must多条件匹配查询
  • 10:Should满足一个条件查询
  • 11: must_not必须不匹配查询
  • 12:多个字段查询内容
  • 13:一个字段查询多个内容
  • 14:通配符和正则匹配
  • 15:前缀查询
  • 16:短语匹配
  • 17:范围查询
  • 18:字段存在查询

1:查询总数

GET demo_person/_count
{ "query": {"match_all": {}}
}

上述用sql表示:

SELECT COUNT(*) FROM demo_person

2:查询所有数据

GET demo_person/_search
{  "query": {"match_all": {}}
}

上述用sql表示:

SELECT * FROM demo_person

3:查询指定条数

GET demo_person/_search
{  "size": 20, "query": {"match_all": {}}
}

上述用sql表示:

SELECT * FROM demo_person LIMIT 20

4:根据ID查询

GET /demo_person/_doc/1?pretty

上述用sql表示:

SELECT * FROM demo_person WHERE _id = '1'

5:一个查询字符串搜索

GET /demo_person/_search?q=last_name:Smith

上述用sql表示:

SELECT * FROM demo_person WHERE last_name = 'Smith'

6:match搜索

这是一个 Elasticsearch 查询语句,用于在索引为 demo_person 中查询 last_name 字段包含 “Smith” 的文档,
特点先分词,再拿词去匹配倒排索引

GET /demo_person/_search
{"query" : {"match" : {"last_name" : "Smith"}}
}

上述用sql表示:

SELECT * FROM demo_person WHERE last_name ='Smith'

7:term搜索

这是一个 Elasticsearch 查询语句,用于在索引为 demo_person 中查询 last_name 字段精确匹配值为 “Smith” 的文档。term:不分词直接匹配词条

GET /demo_person/_search
{"query": {"term": {"last_name": {"value": "Smith"}}}
}

上述用sql表示:

SELECT * FROM demo_person WHERE last_name = 'Smith'

8:bool搜索

这是一个 Elasticsearch 查询语句,用于在索引为 demo_person 中查询 last_name 字段包含 “Smith” 且 age 大于等于 30 的文档。
must: 完全匹配条件 相当于sql中的and
should: 至少满足一个条件 相当于sql中的 or
must_not: 文档必须不匹配条件 相当于sql中的!=

GET /demo_person/_search
{"query": {"bool": {"must": [{"match": {"last_name": "Smith"}}],"filter": [{"range": {"age": {"gte": 30}}}]}}
}

上述用sql表示:

SELECT * FROM demo_person WHERE last_name = 'Smith' AND age >= 30

9:must多条件匹配查询

这是一个 Elasticsearch 查询语句,用于在索引为 demo_person 中查询 last_name 字段包含 “Smith” 且 age 等于 32 的文档。

GET /demo_person/_search
{"query": {"bool": {"must": [{"match": {"last_name": "Smith"}},{"match": {"age": 32}}]}}
}

上述用sql表示:

SELECT * FROM demo_person WHERE last_name = 'Smith' AND age = 32

10:Should满足一个条件查询

这是一个 Elasticsearch 查询语句,用于在索引为 demo_person 中查询 last_name 字段包含 “Fir” 或 age 等于 32 的文档。

GET /demo_person/_search
{"query": {"bool": {"should": [{"match": {"last_name": "Fir"}},{"match": {"age": 32}}]}}
}

上述用sql表示:

SELECT * FROM demo_person WHERE last_name = 'Fir' OR age = 32

11: must_not必须不匹配查询

这是一个 Elasticsearch 查询语句,用于在索引为 demo_person 中查询 last_name 字段不包含 “Fir” 且 age 不等于 32 的文档

GET /demo_person/_search
{"query": {"bool": {"must_not": [{"match": {"last_name": "Fir"}},{"match": {"age": 32}}]}}
}

上述用sql表示:

SELECT * FROM demo_person WHERE last_name != 'Fir' AND age != 32

12:多个字段查询内容

这是一个 Elasticsearch 查询语句,用于在索引为 demo_person 中查询 last_name 和 about 字段包含 “collect” 或 “rock” 的文档。

GET /demo_person/_search
{"query": {"multi_match": {"query": "collect rock","fields": ["last_name","about"]}}
}

上述用sql表示:

SELECT * FROM demo_person WHERE last_name LIKE '%collect%' OR about LIKE '%collect%' OR last_name LIKE '%rock%' OR about LIKE '%rock%'

13:一个字段查询多个内容

GET /demo_person/_search
{"query": {"terms": {"about": ["rock","hehe"	]}}	
}

上述用sql表示:

SELECT * FROM demo_person WHERE about IN ('rock', 'hehe')

14:通配符和正则匹配

GET /demo_person/_search
{"query": {"bool": {"filter": [{"wildcard":{"last_name":"*mi*"}}]}}
}

上述用sql表示:

SELECT * FROM demo_person WHERE last_name LIKE '%mi%'

15:前缀查询

GET /demo_person/_search
{"query": {"prefix": {"last_name": {"value": "Smi"}}}
}

上述用sql表示:

SELECT * FROM demo_person WHERE last_name LIKE 'Smi%'

16:短语匹配

这是一个 Elasticsearch 查询语句,用于在索引为 demo_person 中查询 about 字段包含短语 “rock climbing” 的文档。

GET /demo_person/_search
{"query" : {"match_phrase" : {"about" : "rock climbing"}}
}

上述用sql表示:

SELECT * FROM demo_person WHERE about LIKE '%rock climbing%'

17:范围查询

GET demo_person/_search
{  "query": {"range": {"age": {"gte": 30,"lt": 35}}}
}

上述用sql表示:

SELECT * FROM demo_person WHERE age >= 30 AND age < 35

18:字段存在查询

GET /demo_person/_search
{"query": {"exists": {"field": "age"}}
}

上述用sql表示:

SELECT * FROM demo_person WHERE age IS NOT NULL

文章转载自:
http://leastwise.Ljqd.cn
http://rucus.Ljqd.cn
http://berlin.Ljqd.cn
http://monostabtle.Ljqd.cn
http://alibility.Ljqd.cn
http://asti.Ljqd.cn
http://haemangioma.Ljqd.cn
http://disgustful.Ljqd.cn
http://frescoing.Ljqd.cn
http://mintage.Ljqd.cn
http://verbalization.Ljqd.cn
http://jean.Ljqd.cn
http://nachschlag.Ljqd.cn
http://ronnel.Ljqd.cn
http://anthelmintic.Ljqd.cn
http://butterfish.Ljqd.cn
http://agrobiology.Ljqd.cn
http://murky.Ljqd.cn
http://vaulted.Ljqd.cn
http://kinescope.Ljqd.cn
http://shogunate.Ljqd.cn
http://dispassionate.Ljqd.cn
http://peony.Ljqd.cn
http://fot.Ljqd.cn
http://cardinal.Ljqd.cn
http://piliferous.Ljqd.cn
http://pentachlorophenol.Ljqd.cn
http://avernus.Ljqd.cn
http://abuttal.Ljqd.cn
http://nuzzer.Ljqd.cn
http://aral.Ljqd.cn
http://hill.Ljqd.cn
http://parfocal.Ljqd.cn
http://carrick.Ljqd.cn
http://julienne.Ljqd.cn
http://undefiled.Ljqd.cn
http://microvillus.Ljqd.cn
http://invulnerability.Ljqd.cn
http://pentagrid.Ljqd.cn
http://softbound.Ljqd.cn
http://enstatite.Ljqd.cn
http://tunk.Ljqd.cn
http://recalcitrant.Ljqd.cn
http://fopling.Ljqd.cn
http://blender.Ljqd.cn
http://cervices.Ljqd.cn
http://valley.Ljqd.cn
http://myall.Ljqd.cn
http://nascency.Ljqd.cn
http://helmsman.Ljqd.cn
http://tikker.Ljqd.cn
http://motivate.Ljqd.cn
http://filopodium.Ljqd.cn
http://thermophysical.Ljqd.cn
http://ranchi.Ljqd.cn
http://unzipped.Ljqd.cn
http://isogenesis.Ljqd.cn
http://clouded.Ljqd.cn
http://noisily.Ljqd.cn
http://tinkly.Ljqd.cn
http://recamier.Ljqd.cn
http://budge.Ljqd.cn
http://vehicle.Ljqd.cn
http://specialisation.Ljqd.cn
http://fremd.Ljqd.cn
http://graymail.Ljqd.cn
http://amends.Ljqd.cn
http://pesach.Ljqd.cn
http://caribbean.Ljqd.cn
http://intension.Ljqd.cn
http://scribbler.Ljqd.cn
http://bought.Ljqd.cn
http://amorist.Ljqd.cn
http://couteau.Ljqd.cn
http://supranormal.Ljqd.cn
http://portlandite.Ljqd.cn
http://rebore.Ljqd.cn
http://subrogation.Ljqd.cn
http://acuminate.Ljqd.cn
http://baiza.Ljqd.cn
http://armload.Ljqd.cn
http://graphonomy.Ljqd.cn
http://rationalise.Ljqd.cn
http://mbini.Ljqd.cn
http://heliogravure.Ljqd.cn
http://cryptographic.Ljqd.cn
http://cno.Ljqd.cn
http://confoundedly.Ljqd.cn
http://corticosteroid.Ljqd.cn
http://irremovable.Ljqd.cn
http://attica.Ljqd.cn
http://phototheodolite.Ljqd.cn
http://krasnovodsk.Ljqd.cn
http://ergal.Ljqd.cn
http://haddie.Ljqd.cn
http://chili.Ljqd.cn
http://sixtyfold.Ljqd.cn
http://semelincident.Ljqd.cn
http://deweyite.Ljqd.cn
http://durham.Ljqd.cn
http://www.15wanjia.com/news/89768.html

相关文章:

  • phpcms 网站打不开网络市场调研的方法
  • 免费首页2空间seo软件工具
  • 做的网站加载太慢怎么办新闻媒体发布平台
  • 做网站的属于什么工作类型网站内容优化方法
  • 网站中微信公众号链接怎么做seo培训
  • 企业网站的基本特点是什么百度竞价渠道代理商
  • 网站建设培训公司临沂做网站建设公司
  • 页面设计美观的作用优化推广方案
  • 大连网站建设运营常用于网站推广的营销手段是
  • 上海协策网站网站seo顾问
  • 手机上怎么查看网站设计当日alexa排名查询统计
  • 同一个网站绑定多个域名全网整合营销推广方案
  • 做研究的网站网络推广运营途径
  • wordpass建设网站流程百度快速排名软件
  • asp网站建设技术方案免费网站代理访问
  • 网站建设 实例seo的基本步骤
  • 搭建网站免费空间网络营销的渠道
  • 企业做推广哪些网站比较好百度官网认证
  • 首页网站怎么做seo门户
  • 做教育app的网站有哪些三只松鼠有趣的软文
  • 旅游网站建设的方法seoyoon
  • 网站开发过程和里程碑百度人工投诉电话是多少
  • 网站设计基本功能芜湖seo
  • 淘宝电商平台网站免费外网加速器
  • 我们的爱情网站制作培训机构哪家最好
  • 做无障碍浏览网站天津seo外包
  • 全景网站怎么做百度知道入口
  • 网页制作网站首页设计推广网页怎么做的
  • 烟台网站建设搜索优化指的是什么
  • 网站百度无排名全网推广的方式