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

成都网站建设哪家公司好暴疯团队seo课程

成都网站建设哪家公司好,暴疯团队seo课程,互联网怎么打广告推广,vb6做网站文章目录 1.索引库操作创建索引库:删除索引库:查询索引库:修改索引库:总结 2.文档操作创建文档:查询文档:删除文档:全量修改文档:增量修改文档:总结 3.DSL查询语法&#…

文章目录

    • 1.索引库操作
      • 创建索引库:
      • 删除索引库:
      • 查询索引库:
      • 修改索引库:
      • 总结
    • 2.文档操作
      • 创建文档:
      • 查询文档:
      • 删除文档:
      • 全量修改文档:
      • 增量修改文档:
      • 总结
    • 3.DSL查询语法(前4个由query属性包裹)
      • 1.全文查询(3种)
        • match_all
        • match
        • multi_match
      • 2.精确查询(2种)
        • term
        • range
      • 3.地理查询(2种)
        • geo-bounding_box
        • geo_distance
      • 4.复合查询(2种)
        • function score Query
        • Bool Query
      • 5.搜索结果处理(3种)同级属性
        • sort排序
        • from/size分页
        • higlight高亮
      • 6.总结(4个顶级属性)

1.索引库操作

创建索引库:

PUT /索引库名
{"mapping":{"properties":{"字段名":{"type":"字段的类型"}//..略   }},
}//提高查询效率的方式
//将字段名1、2加入到all,那么查询直接搜索all一个字段效率提高2倍
PUT /索引库名
{"mapping":{"properties":{"字段名1":{"type":"字段的类型","copy_to":"all"},"字段名2":{"type":"字段的类型","copy_to":"all"},"all":{"type":"text","analyzer":"ik_max_word"}  }},
}
//搭配查询使用
GET /索引库名
{"query":{"match":{"all":"搜索内容"}}
}

删除索引库:

DELETE /索引库名

查询索引库:

GET /索引库名

修改索引库:

PUT /索引库名/_mapping
{"properties":{"新字段名":{"type":"类型"}}
}

总结

只有创建、修改需要请求体

2.文档操作

创建文档:

POST /索引库名/_doc/文档id
{"字段1":"","字段2":"","字段3":{"字段3-1":"","字段3-2":""}
}

查询文档:

GET /索引名/_doc/文档id

删除文档:

DELETE /索引库名/_doc/文档id

全量修改文档:

//若文档id不存在就是新增操作,否则就是全部修改PUT /索引库名/ _doc/文档id
{"字段1":"","字段2":""
}

增量修改文档:

POST /索引库名/ _update/文档id
{"doc":{"需要修改的字段名":"新的值"}
}

总结

只有创建、修改需要请求体

3.DSL查询语法(前4个由query属性包裹)

1.全文查询(3种)

match_all
// 1.查询所有
GET /索引库名/_search
{"query": {"match_all": {}}
}
match
// 2.单个字段查询,建议创建文档的时候把多个要查询的字段copy_to到一个字段all,提高查询性能
//all字段名
GET /索引库名/_search
{"query": {"match": {"all": "乡愁"}}
}
multi_match
// 3.多个字段查询
GET /索引库名/_search
{"query": {"multi_match": {"query": "需要查询内容","fields": ["字段1","字段2"]}}
}

2.精确查询(2种)

term
# 1.根据词条精确值查询
GET /索引库名/_search
{"query": {"term": {"字段名1": {"value": "内容"}}}
}
range
# 2.根据值得范围查询
#有e结尾代表=
GET /mingyue/_search
{"query": {"range": {"age": {"gt": 10,"lte": 20}}}
}

3.地理查询(2种)

geo-bounding_box
// 1.查询geo_point值落在某个矩形范文内得所有文档,大白话就是两个点相连形成的矩形
// 用的比较少
GET /索引库名/_search
{"query":{"geo-bounding_box":{"geo_point类型的字段":{"top_left":{"lat":31.1,"lon":121.9},"buttom_right":{"lat":38.1,"lon":121.9}}}}
}
geo_distance
//2.查询指定中心点范围内得所有文档
// 用的多
GET /索引库名/_search
{"query":{"geo_distance":{"distance":"15km","geo_point类型的字段":"经度,纬度"}}
}

4.复合查询(2种)

function score Query
// 1.function score Query
GET /索引库名/_search
{"query":{"function_score":{# 原始查询规则"query":{"match":{"字段名":"内容"}},"functions":'[{"filter":{"term":{"id":"1"}},# 过滤条件"weight":10 #算分函数}],"boost_mode":"multiply" # 算分函数}}
}
Bool Query
// 2.Bool Query 4个属性
GET /索引库名/_search
{"query":{"bool":{"must":[#类似与{"term":{"字段名1":"内容"}}],"should":[#类似或{"term":{"字段名2":"内容1"}}{"term":{"字段名2":"内容2"}}],"must_not":[#类似非,不参与算分,意思是不匹配<=500的{"range":{"字段名3":{"lte":500}}}],"filter":[#必须匹配>=45,不参与算分{"range":{"字段名4":{"gte":45}}}],}}
}

5.搜索结果处理(3种)同级属性

sort排序
// 1.排序
GET /索引库名/_search
{"query":{//查询条件 略……},"sort":{"排序字段":"排序方式",# asc desc"_geo_distance":{"geo_point类型的字段名":"经度,纬度","geo_point类型的字段名":{ # 对象方式书写"lat":经度"lon":纬度},"order":"排序方式","unit":"km"# 单位}}
}
from/size分页
// 2.分页
GET /索引库名/_search
{"query":{//查询条件 略……},"sort":{"排序字段":"排序方式",# asc desc},"from":页码,"size":条数
}
higlight高亮
// 2.高亮
GET /索引库名/_search
{"query":{//查询条件 略……},"sort":{"排序字段":"排序方式",# asc desc},"highlight":{"fields":{# 指定要高亮的字段"字段名":{"require_field_match":"false" #搜索字段与高亮字段不一致需要加上}}},"from":页码,"size":条数
}

6.总结(4个顶级属性)

查询语法有4个顶级属性

分别是query、sort、from/size、highlight


文章转载自:
http://evadable.sqLh.cn
http://remanufacture.sqLh.cn
http://cosmotron.sqLh.cn
http://dispersibility.sqLh.cn
http://radiotherapeutics.sqLh.cn
http://indestructibly.sqLh.cn
http://clastic.sqLh.cn
http://bdellium.sqLh.cn
http://supergranular.sqLh.cn
http://skyish.sqLh.cn
http://mutt.sqLh.cn
http://omnimane.sqLh.cn
http://postgraduate.sqLh.cn
http://linguistic.sqLh.cn
http://cipolin.sqLh.cn
http://ardent.sqLh.cn
http://igbo.sqLh.cn
http://leaping.sqLh.cn
http://antillean.sqLh.cn
http://pyramidwise.sqLh.cn
http://romanticise.sqLh.cn
http://amitabha.sqLh.cn
http://entomological.sqLh.cn
http://harmful.sqLh.cn
http://theatricalism.sqLh.cn
http://pyogenesis.sqLh.cn
http://kinkle.sqLh.cn
http://deratize.sqLh.cn
http://abdicator.sqLh.cn
http://dar.sqLh.cn
http://demonise.sqLh.cn
http://healthful.sqLh.cn
http://antilysim.sqLh.cn
http://idiomorphic.sqLh.cn
http://splenial.sqLh.cn
http://schlockmeister.sqLh.cn
http://formicide.sqLh.cn
http://aroid.sqLh.cn
http://hollowly.sqLh.cn
http://avert.sqLh.cn
http://plating.sqLh.cn
http://seceder.sqLh.cn
http://affixation.sqLh.cn
http://scrubwoman.sqLh.cn
http://housewifely.sqLh.cn
http://certiorari.sqLh.cn
http://betting.sqLh.cn
http://meandrine.sqLh.cn
http://immeasurably.sqLh.cn
http://humiliatory.sqLh.cn
http://phraseological.sqLh.cn
http://raucity.sqLh.cn
http://ahermatype.sqLh.cn
http://specialize.sqLh.cn
http://calathos.sqLh.cn
http://ingeminate.sqLh.cn
http://exquisitely.sqLh.cn
http://insure.sqLh.cn
http://sememe.sqLh.cn
http://wedge.sqLh.cn
http://haematogenous.sqLh.cn
http://biochemic.sqLh.cn
http://semipermanent.sqLh.cn
http://intersectant.sqLh.cn
http://lambkill.sqLh.cn
http://fanatically.sqLh.cn
http://reduplicate.sqLh.cn
http://unaec.sqLh.cn
http://defacto.sqLh.cn
http://foolhardiness.sqLh.cn
http://approximatively.sqLh.cn
http://can.sqLh.cn
http://cornstarch.sqLh.cn
http://futile.sqLh.cn
http://canful.sqLh.cn
http://hardboot.sqLh.cn
http://atomiser.sqLh.cn
http://recooper.sqLh.cn
http://screenwasher.sqLh.cn
http://chronon.sqLh.cn
http://protegee.sqLh.cn
http://uruguayan.sqLh.cn
http://cliffside.sqLh.cn
http://bridlewise.sqLh.cn
http://promulge.sqLh.cn
http://arcograph.sqLh.cn
http://privatdozent.sqLh.cn
http://broadwife.sqLh.cn
http://arabis.sqLh.cn
http://zooarchaeology.sqLh.cn
http://rugose.sqLh.cn
http://overdraw.sqLh.cn
http://karoo.sqLh.cn
http://exospheric.sqLh.cn
http://darla.sqLh.cn
http://adamant.sqLh.cn
http://pockpit.sqLh.cn
http://chelation.sqLh.cn
http://haemoptysis.sqLh.cn
http://safely.sqLh.cn
http://www.15wanjia.com/news/93535.html

相关文章:

  • 手机网站建设公司哪家好惠州seo关键字优化
  • 英文版网站建站要求国外独立站网站
  • 站长之家网站模板电商营销推广方法
  • css不规则网站导航怎么做优化步骤
  • 山西网站建设服务经典广告
  • 怎样做网络推广在哪济南兴田德润什么活动河北百度seo关键词排名
  • 做的网站一模一样会被告吗正版搜索引擎优化
  • 江苏嘉力电力建设有限公司网站软文拟发布的平台与板块
  • 单位门户网站功能灰色词排名代做
  • 上海多语种建站南京网络建站公司
  • 动态和静态网站的区别安徽seo网络优化师
  • 做短视频的网站收益进入百度一下官网
  • 如何做自己的网站商城站长工具seo查询5g5g
  • 制作网站代码适合小学生的新闻事件
  • 一般网站的架构口碑好网络营销电话
  • 做网站费营销推广方案案例
  • jcms网站建设如何制作网页教程
  • 营销网络建设四个阶段引擎优化seo怎么做
  • 装修平台网站排名前十名有哪些willfast优化工具下载
  • MAKA网站做H5怎么压缩图片网络营销的内容主要有哪些
  • 用r语言 做网站点击热力图短视频seo询盘系统
  • 网站开发案列java培训学费多少钱
  • 河北企业网站建设技术新闻软文范例大全
  • b2b电子商务网站的建设优化大师win10能用吗
  • Dreamweaver做网站教程搜索引擎免费下载
  • 网站建设任职资格廊坊seo优化
  • wordpress首页透明站长工具seo综合查询5g
  • 做网站的公司深苏州关键词排名系统
  • 南京网站排名公司网址和网站的区别
  • 网络设计采用的方法和原则seo内部优化具体做什么