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

怎么查询网站是哪家公司做的网络销售技巧和话术

怎么查询网站是哪家公司做的,网络销售技巧和话术,可信网站验证,网站建设租房网模块写在前面 通过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://www.tj-hxxt.cn/news/95220.html

相关文章:

  • 给别人做网站挣钱吗?网络营销的特点分别是
  • 西安网站seo收费营销推广活动方案
  • 先做他个天猫网站百度seo公司兴田德润
  • 长安镇网站建设百度游戏官网
  • 网站建设论文500字独立站seo搜索优化
  • php网站设计要学多久青岛网络推广公司排名
  • 用网站做邮箱吗seo运营推广
  • 重庆的做网站公司深圳网络推广培训机构
  • 东莞网站平台后缀多合一seo插件破解版
  • 怎样做的英文网站产品营销策略有哪些
  • json做网站的数据库长沙快速排名优化
  • wordpress diy主题企业网站seo推广方案
  • 家庭网络组网方案北京seo公司哪家好
  • 怎么选择网站建设公司百度搜索优化平台
  • 唐河网站制作网店培训班
  • 泊头做网站价格百度网盘网页
  • 郴州网站seo汕头企业网络推广
  • 怎样在各b2b网站做推广软文广告投放平台
  • 网站建设技术文案淘宝如何刷关键词增加权重
  • 酒店网站建设方案ppt昆明做网站的公司
  • 如何查看网站备案信息怎样制作一个网页
  • 邹城哪个公司做网站好长春网站seo
  • 做一款手机app大概多少钱百度seo排名优化提高流量
  • 网站建设便宜不可信杭州seo按天计费
  • 昆明做网站优化的公司附近电脑培训学校
  • 利用ps怎么做网站首页如何优化seo
  • 做网站要注意什么问题seo分析seo诊断
  • 赤坎手机网站建设上海百度seo
  • 做it题的网站友情链接工具
  • 学习做网站的网站百度卖货平台