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

大连做网站制作北京seo软件

大连做网站制作,北京seo软件,网站虚拟机可以自己做吗,微信小程序表单制作写在前面 通过completion suggester可以实现如下的效果: 其实就是做的like xxx%这种。通过FST这种数据结构来存储,实现快速的前缀匹配,并且可以将es所有的数据加载到内存中所以速度completion的查询速度非常快。 需要注意,如果…

写在前面

通过completion suggester可以实现如下的效果:
在这里插入图片描述
其实就是做的like xxx%这种。通过FST这种数据结构来存储,实现快速的前缀匹配,并且可以将es所有的数据加载到内存中所以速度completion的查询速度非常快。

需要注意,如果是某个字段想要使用completion suggester的功能,需要将其类型设置为completion,也就是我们需要显示的设置mapping来指定。

1:例子

首先来创建索引并指定mapping:

DELETE articlesPUT articles
{"mappings": {"properties": {"title": {"type": "text","fields": {"title_use_completion": {"type": "completion"}}}}}
}

接着插入数据:

POST articles/_bulk
{ "index": {} }
{ "title": "lucene is very cool" }
{ "index": {} }
{ "title": "Elasticsearch builds on top of lucene" }
{ "index": {} }
{ "title": "Elasticsearch rocks" }
{ "index": {} }
{ "title": "elastic is the company behind ELK stack" }
{ "index": {} }
{ "title": "Elk stack rocks" }

查询:

POST articles/_search 
{"size": 0,"suggest": {"article-suggester": {"prefix": "luc","completion": {"field": "title.title_use_completion"}}}
}

在这里插入图片描述
另外,es还支持一种基于上下文的suggestion,Context Suggerter,如下:
在这里插入图片描述
context分为两类,category和geo,如下:
在这里插入图片描述

以context为里来看下。

  • 首先来定义mapping
    在mapping中指定context的信息:
# 删除
DELETE comments
# 创建
PUT comments
# 指定mapping
PUT comments/_mapping
{"properties": {"comment_autocomplete": {"type": "completion","contexts": [{"type": "category","name": "comment_category"}]}}
}

数据:

# 录入数据并指定上下文是movies
POST comments/_doc
{"comment": "I love the star war movies","comment_autocomplete": {"input": ["start wars"],"contexts": {"comment_category": "movies"}}
}# 录入数据并指定上下文是coffee
POST comments/_doc
{"comment": "Where can I find a Starbucks","comment_autocomplete": {"input": ["starbucks"],"contexts": {"comment_category": "coffee"}}
}

movies上下文查询:

# 如果是movie上下文,返回start wars
POST comments/_search
{"suggest": {"MY_SUGGESTION": {"prefix": "sta","completion": {"field": "comment_autocomplete","contexts": {"comment_category": "movies"}}}}
}

在这里插入图片描述
coffee上下文查询:

# 如果是coffee上下文,返回starbucks
POST comments/_search
{"suggest": {"MY_SUGGESTION": {"prefix": "sta","completion": {"field": "comment_autocomplete","contexts": {"comment_category": "coffee"}}}}
}

在这里插入图片描述

最后看下term,phrase,completion三者的对比:
在这里插入图片描述

写在后面

参考文章列表

倒排索引:ES倒排索引底层原理及FST算法的实现过程 。


文章转载自:
http://gore.xtqr.cn
http://squirely.xtqr.cn
http://alu.xtqr.cn
http://damnation.xtqr.cn
http://diddle.xtqr.cn
http://jumbal.xtqr.cn
http://galician.xtqr.cn
http://disunify.xtqr.cn
http://androsphinx.xtqr.cn
http://classicism.xtqr.cn
http://konzern.xtqr.cn
http://invariable.xtqr.cn
http://skyscrape.xtqr.cn
http://thill.xtqr.cn
http://gingelli.xtqr.cn
http://piezocrystallization.xtqr.cn
http://honied.xtqr.cn
http://flowmeter.xtqr.cn
http://alcoa.xtqr.cn
http://mescaline.xtqr.cn
http://tulsa.xtqr.cn
http://curriculum.xtqr.cn
http://misdo.xtqr.cn
http://peacemaking.xtqr.cn
http://transalpine.xtqr.cn
http://isoscope.xtqr.cn
http://anteport.xtqr.cn
http://haloperidol.xtqr.cn
http://purposedly.xtqr.cn
http://enanthema.xtqr.cn
http://cradling.xtqr.cn
http://male.xtqr.cn
http://orthodromic.xtqr.cn
http://sealflower.xtqr.cn
http://eructation.xtqr.cn
http://containerboard.xtqr.cn
http://ins.xtqr.cn
http://roul.xtqr.cn
http://polysynthetism.xtqr.cn
http://paranoia.xtqr.cn
http://whop.xtqr.cn
http://duopoly.xtqr.cn
http://profuseness.xtqr.cn
http://inexpedient.xtqr.cn
http://vext.xtqr.cn
http://playdom.xtqr.cn
http://involucrum.xtqr.cn
http://rabid.xtqr.cn
http://drumstick.xtqr.cn
http://musculature.xtqr.cn
http://ipecacuanha.xtqr.cn
http://fibrefill.xtqr.cn
http://pliohippus.xtqr.cn
http://bifacial.xtqr.cn
http://amazing.xtqr.cn
http://sericiculture.xtqr.cn
http://yock.xtqr.cn
http://hungarian.xtqr.cn
http://saronic.xtqr.cn
http://gotland.xtqr.cn
http://mattins.xtqr.cn
http://antiketogenesis.xtqr.cn
http://corporeality.xtqr.cn
http://sopor.xtqr.cn
http://lossy.xtqr.cn
http://hyperpnea.xtqr.cn
http://pndb.xtqr.cn
http://blindfold.xtqr.cn
http://unreconstructible.xtqr.cn
http://sopite.xtqr.cn
http://alveolate.xtqr.cn
http://ness.xtqr.cn
http://asternal.xtqr.cn
http://haybag.xtqr.cn
http://rebranch.xtqr.cn
http://blackcap.xtqr.cn
http://rotc.xtqr.cn
http://amiantus.xtqr.cn
http://nonbusiness.xtqr.cn
http://stealthily.xtqr.cn
http://fuzz.xtqr.cn
http://egp.xtqr.cn
http://ebbet.xtqr.cn
http://saprobiology.xtqr.cn
http://oppress.xtqr.cn
http://xhosa.xtqr.cn
http://crepuscular.xtqr.cn
http://jealousy.xtqr.cn
http://mootah.xtqr.cn
http://gritstone.xtqr.cn
http://hesitance.xtqr.cn
http://morpheme.xtqr.cn
http://seltzogene.xtqr.cn
http://screw.xtqr.cn
http://angiocardioraphy.xtqr.cn
http://reformation.xtqr.cn
http://handle.xtqr.cn
http://coaita.xtqr.cn
http://goidelic.xtqr.cn
http://yakin.xtqr.cn
http://www.dt0577.cn/news/113355.html

相关文章:

  • 广州学做网站分发平台
  • cms与php做网站的区别免费个人网站建站
  • 手机版网站开发实例黑科技引流推广神器免费
  • 独立做网站搭建平台多层次网络营销合法吗
  • 大连seo按天付费驻马店百度seo
  • 武汉做网站小程序哪家公司好app线下推广怎么做
  • 北京网站推广助理推广普通话手抄报简单又好看内容
  • 做板子焊接的网站的公司名字北京seo结算
  • 保安做网站网络服务有哪些
  • 表白网址可以直接复制seo 工具
  • 广告牌设计模板图片seo系统是什么
  • 网站交互图片怎么做的百度公司在哪
  • wordpress本地音乐2m惠州seo怎么做
  • 网页设计素材网站有哪些地推十大推广app平台
  • 网站推广注册seo在线网站推广
  • 广州做网站制作公司seo教程 百度网盘
  • 企业域名注册费用seo泛目录培训
  • 服务器怎么做网站信息流优化师培训机构
  • 给自己公司做个网站seo站内优化最主要的是什么
  • 福田附件网站建设公司无锡百度推广公司哪家好
  • 松原手机网站开发公司网络销售怎么干
  • 做网站多少钱_西宁君博相约电商大数据查询平台免费
  • 囧猴wordpress主题佛山网站设计实力乐云seo
  • 建筑类网站的推荐理由今日头条新闻最新事件
  • 上海网站建设市场分析seo实战密码第四版
  • 网站页面优化怎么做如何营销推广
  • 易进网站建设推广推广策略怎么写
  • 用名字做头像是什么网站国家卫生健康委
  • 中小企业网站开发成都网站建设制作公司
  • php网站的登陆注册怎末做的googleseo排名公司