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

网站建设微信营销公司seo入门书籍推荐

网站建设微信营销公司,seo入门书籍推荐,工程建设教育网首页,旅游网站开发需求分析term 查询执行精确值匹配,要求文档中的字段值与指定的词项完全相等。对于日期字段等精确值字段,通常使用 term 查询可以快速有效地匹配文档。match 查询执行全文搜索,会对输入的文本进行分析,生成查询词项,并试图找到与…
  • term 查询执行精确值匹配,要求文档中的字段值与指定的词项完全相等。对于日期字段等精确值字段,通常使用 term 查询可以快速有效地匹配文档。
  • match 查询执行全文搜索,会对输入的文本进行分析,生成查询词项,并试图找到与这些词项匹配的文档
  • constant_score查询是一种特殊的查询,它会为每个匹配的文档分配一个固定的分数(默认为 1.0)

DELETE productsPOST /products/_bulk
{ "index": { "_id": 1 }}
{ "price" : 10,"avaliable":true,"date":"2023-01-01", "productID" : "XHDK-A-1293-#fJ3" }
{ "index": { "_id": 2 }}
{ "price" : 20,"avaliable":true,"date":"2023-01-01", "productID" : "KDKE-B-9947-#kL5" }
{ "index": { "_id": 3 }}
{ "price" : 30,"avaliable":true, "productID" : "JODL-X-1937-#pV7" }
{ "index": { "_id": 4 }}
{ "price" : 30,"avaliable":false, "productID" : "QQPX-R-3956-#aD8" }GET products/_mapping# 对布尔值 match 查询,有算分
POST products/_search
{"profile": "true","explain": true,"query": {"term": {"avaliable": true}}
}# 对布尔值,通过constant score 转成 filtering,没有算分
POST products/_search
{"profile": "true","explain": true,"query": {"constant_score": {"filter": {"term": {"avaliable": true}}}}
}# 数字类型 Term
POST products/_search
{"profile": "true","explain": true,"query": {"term": {"price": 30}}
}# 数字类型 terms
POST products/_search
{"query": {"constant_score": {"filter": {"terms": {"price": ["20","30"]}}}}
}# 数字 Range 查询
GET products/_search
{"query" : {"constant_score" : {"filter" : {"range" : {"price" : {"gte" : 20,"lte"  : 30}}}}}
}# 日期 range
POST products/_search
{"query" : {"constant_score" : {"filter" : {"range" : {"date" : {"gte" : "now-1y"}}}}}
}# exists查询
POST products/_search
{"query": {"constant_score": {"filter": {"exists": {"field": "date"}}}}
}# 处理多值字段
POST /movies/_bulk
{ "index": { "_id": 1 }}
{ "title" : "Father of the Bridge Part II","year":1995, "genre":"Comedy"}
{ "index": { "_id": 2 }}
{ "title" : "Dave","year":1993,"genre":["Comedy","Romance"] }# 处理多值字段,term 查询是包含,而不是等于
POST movies/_search
{"query": {"constant_score": {"filter": {"term": {"genre.keyword": "Comedy"}}}}
}# 字符类型 terms
POST products/_search
{"query": {"constant_score": {"filter": {"terms": {"productID.keyword": ["QQPX-R-3956-#aD8","JODL-X-1937-#pV7"]}}}}
}POST products/_search
{"profile": "true","explain": true,"query": {"match": {"price": 30}}
}POST products/_search
{"profile": "true","explain": true,"query": {"term": {"date": "2019-01-01"}}
}POST products/_search
{"profile": "true","explain": true,"query": {"match": {"date": "2019-01-01"}}
}POST products/_search
{"profile": "true","explain": true,"query": {"constant_score": {"filter": {"term": {"productID.keyword": "XHDK-A-1293-#fJ3"}}}}
}POST products/_search
{"profile": "true","explain": true,"query": {"term": {"productID.keyword": "XHDK-A-1293-#fJ3"}}
}# 对布尔数值
POST products/_search
{"query": {"constant_score": {"filter": {"term": {"avaliable": "false"}}}}
}POST products/_search
{"query": {"term": {"avaliable": {"value": "false"}}}
}POST products/_search
{"profile": "true","explain": true,"query": {"term": {"price": {"value": "20"}}}
}POST products/_search
{"profile": "true","explain": true,"query": {"match": {"price": "20"}}
}POST products/_search
{"query": {"constant_score": {"filter": {"bool": {"must_not": {"exists": {"field": "date"}}}}}}
}DELETE products

# boosting 查询包含以下关键元素:

# positive: 正面条件,定义了一个条件(这里是 "content": "elasticsearch"), 当文档匹配这个条件时,会增加文档的相关性得分。

# negative: 负面条件,定义了另一个条件(这里是 "content": "like"), 当文档匹配这个条件时,会减少文档的相关性得分。

# negative_boost: 这个参数指定了负面条件对得分的影响程度。在这个示例中,


DELETE testscorePUT testscore
{"settings": {"number_of_shards": 1},"mappings": {"properties": {"content": {"type": "text"}}}
}PUT testscore/_bulk
{ "index": { "_id": 1 }}
{ "content":"we use Elasticsearch to power the search" }
{ "index": { "_id": 2 }}
{ "content":"we like elasticsearch" }
{ "index": { "_id": 3 }}
{ "content":"The scoring of documents is caculated by the scoring formula" }
{ "index": { "_id": 4 }}
{ "content":"you know, for search" }# the elasticsearch会查出123条数据
# the会查出13数据
POST /testscore/_search
{//"explain": true,"query": {"match": {//"content":"you""content": "elasticsearch"//"content":"the"//"content": "the elasticsearch"}}
}# boosting 查询包含以下关键元素:
# positive: 正面条件,定义了一个条件(这里是 "content": "elasticsearch"),
#           当文档匹配这个条件时,会增加文档的相关性得分。
# negative: 负面条件,定义了另一个条件(这里是 "content": "like"),
#           当文档匹配这个条件时,会减少文档的相关性得分。
# negative_boost: 这个参数指定了负面条件对得分的影响程度。在这个示例中,
#                 设置为 0.2,表示负面条件的匹配与正面条件相比,对相关性得分的影响降低了 80%。
POST testscore/_search
{"query": {"boosting" : {"positive" : {"term" : {"content" : "elasticsearch"}},"negative" : {"term" : {"content" : "like"}},"negative_boost" : 0.2}}
}DELETE testscorePOST tmdb/_search
{"_source": ["title","overview"],"query": {"more_like_this": {"fields": ["title^10","overview"],"like": [{"_id":"14191"}],"min_term_freq": 1,"max_query_terms": 12}}
}
http://www.ds6.com.cn/news/106191.html

相关文章:

  • 网页设计师报考条件合肥seo推广培训班
  • wordpress首页显示摘要插件seo排名如何
  • 昆明网站建设询力鼎科技千峰培训
  • 福州官网建站厂宁波seo企业推广
  • h5网站价格方案模板建站哪里有
  • 合川网站建设公司seo基础知识培训视频
  • 陕西网站制作公司哪家好seo网站优化详解
  • 做网站的文章专业竞价托管哪家好
  • 网站对图片优化吗网站优化排名软件网站
  • 实惠高端网站设计品牌百度西安分公司地址
  • 秦皇岛陵县网站建设山东搜索引擎优化
  • 北京门户企业网站建设郴州seo网络优化
  • 中英企业网站模板企业网站建设制作
  • 网站备案好还是不备案好小程序运营推广公司
  • wap网站建设费用南京百度推广
  • 买了域名怎么做自己的网站百度指数电脑版
  • 做健身网站开题报告谷歌商店paypal三件套
  • 申请免费网站想做游戏推广怎么找游戏公司
  • 东莞市住房和城乡建设厅网站首页知识营销成功案例介绍
  • 做网站的如何找业务百度网盘资源搜索引擎搜索
  • 专门做护肤品的网站是成都达洱狐网络科技有限公司
  • 石家庄建设厅官方网站自动点击器怎么用
  • 做营销策划要用到哪些网站seo服务加盟
  • 重庆网站制作一般需要多少钱百度联盟怎么加入
  • 沈阳家乐福网上商城windows优化大师的特点
  • 电商平台数据库设计广州seo实战培训
  • 国际独立站百度广告投放平台
  • 计算机怎么建设网站怎样制作网站
  • 做外贸在什么网站好郑州网站制作公司哪家好
  • 做建材的网站网站收录入口申请查询