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

歙县建设银行网站互联网培训班学费多少

歙县建设银行网站,互联网培训班学费多少,长沙网站设计服务,莱芜网站排名价格模糊查询 前缀搜索&#xff1a;prefix 概念&#xff1a;以xx开头的搜索&#xff0c;不计算相关度评分。 注意&#xff1a; 前缀搜索匹配的是term&#xff0c;而不是field。前缀搜索的性能很差前缀搜索没有缓存前缀搜索尽可能把前缀长度设置的更长 语法&#xff1a; GET <ind…

模糊查询

  • 前缀搜索:prefix

    概念:以xx开头的搜索,不计算相关度评分。
    注意:
    • 前缀搜索匹配的是term,而不是field。
    • 前缀搜索的性能很差
    • 前缀搜索没有缓存
    • 前缀搜索尽可能把前缀长度设置的更长
    语法:
    GET <index>/_search
    {"query": {"prefix": {"<field>": {"value": "<word_prefix>"}}}
    }
    index_prefixes: 默认   "min_chars" : 2,   "max_chars" : 5 
    
#prefix: 前缀搜索
DELETE my_index
# elasticsearch stack
# elasticsearch search
# el
# ela 
# elas elasticsearch
PUT my_index
{"mappings": {"properties": {"text": {"analyzer": "ik_max_word","type": "text","index_prefixes":{"min_chars":2,"max_chars":4},"fields": {"keyword": {"type": "keyword","ignore_above": 256}}}}}
}
GET my_index/_mapping
POST /my_index/_bulk?filter_path=items.*.error
{"index":{"_id":"1"}}
{"text":"城管打电话喊商贩去摆摊摊"}
{"index":{"_id":"2"}}
{"text":"笑果文化回应商贩老农去摆摊"}
{"index":{"_id":"3"}}
{"text":"老农耗时17年种出椅子树"}
{"index":{"_id":"4"}}
{"text":"夫妻结婚30多年AA制,被城管抓"}
{"index":{"_id":"5"}}
{"text":"黑人见义勇为阻止抢劫反被铐住"}
GET my_index/_search
GET my_index/_mapping
GET _analyze
{"text": ["夫妻结婚30多年AA制,被城管抓"]
}
GET my_index/_search
{"query": {"prefix": {"text": {"value": "城管"}}}
}
# 通配符
DELETE my_index
POST /my_index/_bulk
{ "index": { "_id": "1"} }
{ "text": "my english" }
{ "index": { "_id": "2"} }
{ "text": "my english is good" }
{ "index": { "_id": "3"} }
{ "text": "my chinese is good" }
{ "index": { "_id": "4"} }
{ "text": "my japanese is nice" }
{ "index": { "_id": "5"} }
{ "text": "my disk is full" }
DELETE product_en
POST /product_en/_bulk
{ "index": { "_id": "1"} }
{ "title": "my english","desc" :  "shouji zhong de zhandouji","price" :  3999, "tags": [ "xingjiabi", "fashao", "buka", "1"]}
{ "index": { "_id": "2"} }
{ "title": "xiaomi nfc phone","desc" :  "zhichi quangongneng nfc,shouji zhong de jianjiji","price" :  4999, "tags": [ "xingjiabi", "fashao", "gongjiaoka" , "asd2fgas"]}
{ "index": { "_id": "3"} }
{ "title": "nfc phone","desc" :  "shouji zhong de hongzhaji","price" :  2999, "tags": [ "xingjiabi", "fashao", "menjinka" , "as345"]}
{ "title": { "_id": "4"} }
{ "text": "xiaomi erji","desc" :  "erji zhong de huangmenji","price" :  999, "tags": [ "low", "bufangshui", "yinzhicha", "4dsg" ]}
{ "index": { "_id": "5"} }
{ "title": "hongmi erji","desc" :  "erji zhong de kendeji","price" :  399, "tags": [ "lowbee", "xuhangduan", "zhiliangx" , "sdg5"]}
GET my_index/_search
GET product_en/_searchGET my_index/_search
{"query": {"wildcard": {"text.keyword": {"value": "my eng*ish"}}}
}
GET product_en/_mapping
#exact value
GET product_en/_search
{"query": {"wildcard": {"tags.keyword": {"value": "men*inka"}}}
}
#正则
GET product_en/_search
GET product_en/_search
{"query": {"regexp": {"title": "[\\s\\S]*nfc[\\s\\S]*"}}
}
GET product_en/_search
GET product_en/_search
{"query": {"regexp": {"desc": {"value": "zh~dng","flags": "COMPLEMENT"}}}
}
GET product_en/_search
{"query": {"regexp": {"tags.keyword": {"value": ".*<2-3>.*","flags": "INTERVAL"}}}
}
flags
  • ALL

    启用所有可选操作符。

  • COMPLEMENT

    启用操作符。可以使用对下面最短的模式进行否定。例如

    a~bc # matches ‘adc’ and ‘aec’ but not ‘abc’

  • INTERVAL

    启用<>操作符。可以使用<>匹配数值范围。例如

    foo<1-100> # matches ‘foo1’, ‘foo2’ … ‘foo99’, ‘foo100’

    foo<01-100> # matches ‘foo01’, ‘foo02’ … ‘foo99’, ‘foo100’

  • INTERSECTION

    启用&操作符,它充当AND操作符。如果左边和右边的模式都匹配,则匹配成功。例如:

    aaa.+&.+bbb # matches ‘aaabbb’

  • ANYSTRING

    启用@操作符。您可以使用@来匹配任何整个字符串。
    您可以将@操作符与&和~操作符组合起来,创建一个“everything except”逻辑。例如:

    @&~(abc.+) # matches everything except terms beginning with ‘abc’

  • 模糊查询:fuzzy

    混淆字符 (box → fox) 缺少字符 (black → lack)

    多出字符 (sic → sick) 颠倒次序 (act → cat)

    语法
    GET <index>/_search
    {"query": {"fuzzy": {"<field>": {"value": "<keyword>"}}}
    }
    
# fuzzy:模糊查询
GET product_en/_search
GET product_en/_search
{"query": {"fuzzy": {"desc": {"value": "quangongneng nfc","fuzziness": "2"}}}
}GET product_en/_search
{"query": {"match": {"desc": {"query": "nfe quasdasdasdasd","fuzziness": 1}}}
}
参数:
# match_phrase_prefix
GET product_en/_search
{"query": {"match_phrase": {"desc": "shouji zhong de"}}
}GET product_en/_search
{"query": {"match_phrase_prefix": {"desc": {"query": "de zhong shouji hongzhaji","max_expansions": 50,"slop":3}}}
}GET product_en/_search
{"query": {"match_phrase_prefix": {"desc": {"query": "zhong hongzhaji","max_expansions": 50,"slop": 3}}}
}# source: zhong de hongzhaji
# query:  zhong >  hongzhaji# source: shouji zhong de hongzhaji
# query:  de zhong shouji hongzhaji# de shouji/zhong  hongzhaji  1次
# shouji/de zhong  hongzhaji  2次
# shouji zhong/de  hongzhaji  3次
# shouji zhong de  hongzhaji  4

#ngram min_gram =1 “max_gram”: 2

GET _analyze
{
“tokenizer”: “ik_max_word”,
“filter”: [ “edge_ngram” ],
“text”: “reba always loves me”
}

#min_gram =1 “max_gram”: 1
#r a l m

#min_gram =1 “max_gram”: 2
#r a l m
#re al lo me

#min_gram =2 “max_gram”: 3
#re al lo me
#reb alw lov me

PUT my_index
{
“settings”: {
“analysis”: {
“filter”: {
“2_3_edge_ngram”: {
“type”: “edge_ngram”,
“min_gram”: 2,
“max_gram”: 3
}
},
“analyzer”: {
“my_edge_ngram”: {
“type”:“custom”,
“tokenizer”: “standard”,
“filter”: [ “2_3_edge_ngram” ]
}
}
}
},
“mappings”: {
“properties”: {
“text”: {
“type”: “text”,
“analyzer”:“my_edge_ngram”,
“search_analyzer”: “standard”
}
}
}
}
GET /my_index/_mapping

POST /my_index/_bulk
{ “index”: { “_id”: “1”} }
{ “text”: “my english” }
{ “index”: { “_id”: “2”} }
{ “text”: “my english is good” }
{ “index”: { “_id”: “3”} }
{ “text”: “my chinese is good” }
{ “index”: { “_id”: “4”} }
{ “text”: “my japanese is nice” }
{ “index”: { “_id”: “5”} }
{ “text”: “my disk is full” }

GET /my_index/_search
GET /my_index/_mapping
GET /my_index/_search
{
“query”: {
“match_phrase”: {
“text”: “my eng is goo”
}
}
}

PUT my_index2
{
“settings”: {
“analysis”: {
“filter”: {
“2_3_grams”: {
“type”: “edge_ngram”,
“min_gram”: 2,
“max_gram”: 3
}
},
“analyzer”: {
“my_edge_ngram”: {
“type”:“custom”,
“tokenizer”: “standard”,
“filter”: [ “2_3_grams” ]
}
}
}
},
“mappings”: {
“properties”: {
“text”: {
“type”: “text”,
“analyzer”:“my_edge_ngram”,
“search_analyzer”: “standard”
}
}
}
}
GET /my_index2/_mapping
POST /my_index2/_bulk
{ “index”: { “_id”: “1”} }
{ “text”: “my english” }
{ “index”: { “_id”: “2”} }
{ “text”: “my english is good” }
{ “index”: { “_id”: “3”} }
{ “text”: “my chinese is good” }
{ “index”: { “_id”: “4”} }
{ “text”: “my japanese is nice” }
{ “index”: { “_id”: “5”} }
{ “text”: “my disk is full” }

GET /my_index2/_search
{
“query”: {
“match_phrase”: {
“text”: “my eng is goo”
}
}
}

GET _analyze
{
“tokenizer”: “ik_max_word”,
“filter”: [ “ngram” ],
“text”: “用心做皮肤,用脚做游戏”
}

http://www.tj-hxxt.cn/news/121939.html

相关文章:

  • 哈尔滨网站设计联系方式百度指数官网查询
  • 视频网站 建设免费网站优化排名
  • 用国外网站 图片做自媒体南京seo优化
  • 做网站用什么电脑怎么接推广
  • 网页设计尺寸高度企业seo
  • php框架做网站西安网站公司推广
  • 北京手机网站开发奉化seo页面优化外包
  • 网站建设的seo策略域名交易域名出售
  • 深圳龙岗邮编优化英文
  • 虎门做网站公司地推团队去哪里找
  • 专做hiphop的网站衡水seo培训
  • 山东青岛网站建设公司成都网站建设
  • 聊天app开发费用廊坊seo关键词优化
  • 重庆企业的网站建设怎么推广产品
  • 国家知识产权局商标官网查询入口百度荤seo公司
  • 做网站站怎么赚钱吗免费做网站怎么做网站链接
  • 旅游必去的10个地方seo论坛
  • 网站开发如何找甲方友链交换网站源码
  • 网页游戏制作工具化工seo顾问
  • 蓝衫网站建设网站seo优化技巧
  • 如何做网页图片南昌网站seo
  • 做视频网站 许可手机优化大师官方版
  • 设计装修公司哪家好济南seo优化外包服务
  • 做网站需要招什么职位网络营销的一般流程
  • 网站建设需要学什么搜狗网
  • 网站 后台 回车不了必应搜索引擎国际版
  • 做音乐网站建设的开发平台seo指什么
  • 昆明云南微网站搭建哪家好大数据培训机构排名前十
  • 做图软件官方网站seo系统推广
  • wordpress page 分页seo优化一般包括哪些