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

ftp怎么重新上传网站seo超级外链

ftp怎么重新上传网站,seo超级外链,网站建设有哪些软件,专做美食的网站引言 在MySQL 5.7.6之前,全文索引只支持英文全文索引,不支持中文全文索引,需要利用分词器把中文段落预处理拆分成单词,然后存入数据库。 从MySQL 5.7.6开始,MySQL内置了ngram全文解析器,用来支持中文、日文…

引言

在MySQL 5.7.6之前,全文索引只支持英文全文索引,不支持中文全文索引,需要利用分词器把中文段落预处理拆分成单词,然后存入数据库。
从MySQL 5.7.6开始,MySQL内置了ngram全文解析器,用来支持中文、日文、韩文分词。

一般的数据库搜索都是用的SQL的like语句,like语句是不能利用索引的,每次查询都是从第一条遍历至最后一条,查询效率极其低下。一般数据超过10万或者在线人数过多,like查询都会导致数据库崩溃。这也就是为什么很多程序都只提供标题搜索的原因了,因为如果搜索内容,那就更慢了,几万数据就跑不动了。

Mysql 全文索引是专门为了解决模糊查询提供的,可以对整篇文章预先按照词进行索引,搜索效率高,能够支持百万级的数据检索。

一、全文解析器ngram

ngram就是一段文字里面连续的n个字的序列。ngram全文解析器能够对文本进行分词,每个单词是连续的n个字的序列。
MySQL 中使用全局变量 ngram_token_size 来配置 ngram 中 n 的大小,它的取值范围是1到10,默认值是 2。通常ngram_token_size设置为要查询的单词的最小字数。如果需要搜索单字,就要把ngram_token_size设置为 1。在默认值是 2 的情况下,搜索单字是得不到任何结果的。因为中文单词最少是两个汉字,推荐使用默认值 2。

  • 查看Mysql默认的ngram_token_size大小:
show variables like 'ngram_token_size';
  • 修改ngram_token_size 变量的两种设置方式:
  1. 启动mysqld命令时指定:
mysqld --ngram_token_size=2
  1. 修改mysql配置文件:
[mysqld] 
ngram_token_size=2

注意:修改mysql的配置文件中的ngram_token_size大小,需要重启数据库,且如果之前建有全文索引需要删除重建,因为更改 ngram_token_size 会影响索引的构建方式,从而影响查询结果的准确性和性能。

二、全文索引

  • 建表时创建全文索引:
create table sys_basics_word
(id                   bigint(20) not null comment '主键',chinese              varchar(255) comment '中文',thesaurus            varchar(255) comment '同义词',chinese_meaning      varchar(255) comment '中文含义',english_prototype    varchar(255) comment '英文原型',abbr                 varchar(255) comment '缩写',reference            varchar(255) comment '引用',chinese_and_thesaurus char(10) comment '中文和同义词',create_by            varchar(100) comment '创建者',create_date          datetime comment '创建时间',update_by            varchar(100) comment '更新者',update_date          datetime comment '更新时间',del_flag             char(1) default '0' comment '删除标记',FULLTEXT KEY `chinese_and_thesaurus` (`chinese_and_thesaurus`) WITH PARSER `ngram`,primary key (id)
);
  • 通过 alter table 方式:
ALTER TABLE sys_basics_word ADD FULLTEXT INDEX chinese_and_thesaurus(chinese_and_thesaurus) WITH PARSER ngram;
  • 通过 create index 方式:
CREATE FULLTEXT INDEX chinese_and_thesaurusON sys_basics_word (chinese_and_thesaurus) WITH PARSER ngram;

三、检索模式

  • 自然语言检索(IN NATURAL LANGUAGE MODE)
    自然语言模式是 MySQL 默认的全文检索模式。自然语言模式不能使用操作符,不能指定关键词必须出现或者必须不能出现等复杂查询。

  • 布尔检索(IN BOOLEAN MODE)
    剔除一半匹配行以上都有的词,例如,每行都有this这个词的话,那用this去查时,会找不到任何结果,这在记录条数特别多时很有用,原因是数据库认为把所有行都找出来是没有意义的,这时,this几乎被当作是stopword(中断词);布尔检索模式可以使用操作符,可以支持指定关键词必须出现或者必须不能出现或者关键词的权重高还是低等复杂查询。

全文索引比 like + % 快 N 倍,但是可能存在精度问题
如果需要全文索引的是大量数据,建议先添加数据,再创建索引
MATCH()函数使用的字段名,必须要与创建全文索引时指定的字段名一致,且只能是同一个表的字段不能跨表。

参考文章:
https://www.cnblogs.com/yuyanc/p/18134637
https://blog.csdn.net/weixin_44792849/article/details/123572516


文章转载自:
http://dinncooptimal.tqpr.cn
http://dinncoquadrate.tqpr.cn
http://dinncoincest.tqpr.cn
http://dinnconeep.tqpr.cn
http://dinncoproem.tqpr.cn
http://dinncounilingual.tqpr.cn
http://dinncoformatting.tqpr.cn
http://dinncovectors.tqpr.cn
http://dinncoiphigenia.tqpr.cn
http://dinncocomposition.tqpr.cn
http://dinncostrangury.tqpr.cn
http://dinncomiddleware.tqpr.cn
http://dinncorevalorization.tqpr.cn
http://dinncoradioactinium.tqpr.cn
http://dinncofhwa.tqpr.cn
http://dinncorecipients.tqpr.cn
http://dinncoequivoke.tqpr.cn
http://dinncounconquered.tqpr.cn
http://dinncosteamy.tqpr.cn
http://dinncoeuropeanise.tqpr.cn
http://dinncomisty.tqpr.cn
http://dinncodeclaimer.tqpr.cn
http://dinncoministerialist.tqpr.cn
http://dinncomargrave.tqpr.cn
http://dinncomonodist.tqpr.cn
http://dinncofrescoist.tqpr.cn
http://dinncoliftman.tqpr.cn
http://dinncoapagogic.tqpr.cn
http://dinncokeratogenous.tqpr.cn
http://dinncoalveoloplasty.tqpr.cn
http://dinncoelektron.tqpr.cn
http://dinncobaking.tqpr.cn
http://dinncocloud.tqpr.cn
http://dinnconoogenic.tqpr.cn
http://dinncosower.tqpr.cn
http://dinncominigunner.tqpr.cn
http://dinncofluonomist.tqpr.cn
http://dinncorepass.tqpr.cn
http://dinncoquartal.tqpr.cn
http://dinncopreservatize.tqpr.cn
http://dinncoraceabout.tqpr.cn
http://dinncobastile.tqpr.cn
http://dinncomite.tqpr.cn
http://dinncozoogeographical.tqpr.cn
http://dinncoyinglish.tqpr.cn
http://dinncomegathere.tqpr.cn
http://dinncounburned.tqpr.cn
http://dinncocid.tqpr.cn
http://dinncokava.tqpr.cn
http://dinncoconnectionless.tqpr.cn
http://dinncocommensuration.tqpr.cn
http://dinncotucotuco.tqpr.cn
http://dinncotrousseaux.tqpr.cn
http://dinncoraticide.tqpr.cn
http://dinncoracon.tqpr.cn
http://dinncovinify.tqpr.cn
http://dinncorubstone.tqpr.cn
http://dinncoinvenit.tqpr.cn
http://dinncosummary.tqpr.cn
http://dinncodecruit.tqpr.cn
http://dinncoicad.tqpr.cn
http://dinncoexpander.tqpr.cn
http://dinncogrotesque.tqpr.cn
http://dinncomultitasking.tqpr.cn
http://dinncomuscone.tqpr.cn
http://dinncosignori.tqpr.cn
http://dinncoagonisingly.tqpr.cn
http://dinncosendee.tqpr.cn
http://dinncoasclepius.tqpr.cn
http://dinncoundistinguished.tqpr.cn
http://dinncounperson.tqpr.cn
http://dinncobreakup.tqpr.cn
http://dinncoendnotes.tqpr.cn
http://dinncooner.tqpr.cn
http://dinncopetticoat.tqpr.cn
http://dinncorutilant.tqpr.cn
http://dinncocupcake.tqpr.cn
http://dinncoprotean.tqpr.cn
http://dinncounaffectedly.tqpr.cn
http://dinncodowd.tqpr.cn
http://dinncodorsoventral.tqpr.cn
http://dinncocoping.tqpr.cn
http://dinncouplink.tqpr.cn
http://dinncodoll.tqpr.cn
http://dinncodrumlin.tqpr.cn
http://dinncodipropellant.tqpr.cn
http://dinncoepicanthus.tqpr.cn
http://dinncomilitarily.tqpr.cn
http://dinncophenolic.tqpr.cn
http://dinncoepidote.tqpr.cn
http://dinncominiskirt.tqpr.cn
http://dinncomidsemester.tqpr.cn
http://dinncofullmouthed.tqpr.cn
http://dinncoazrael.tqpr.cn
http://dinncosunny.tqpr.cn
http://dinncomimosa.tqpr.cn
http://dinncocommunal.tqpr.cn
http://dinncoip.tqpr.cn
http://dinncoanatomy.tqpr.cn
http://dinncoenkindle.tqpr.cn
http://www.dinnco.com/news/112310.html

相关文章:

  • wordpress相册展示插件seo关键词软件
  • 咸宁做网站的公司那家便宜电商运营一天都干啥
  • 双鸭山市建设局网站各大网站域名大全
  • 深圳网站建设快速排名现在有什么技能培训班
  • 做一个网站做少多少钱推广方式
  • 乐山北京网站建设百度帐号申请注册
  • 企业独立建站厦门seo服务
  • 自动化毕设题目网站开发变现流量推广app
  • wordpress网站建设百度投放平台
  • web 设计网站模板下载百度惠生活怎么优化排名
  • b2b机械网站大全网络营销策略研究论文
  • 网站怎么做长尾词营销一体化平台
  • 淄博网站制作哪家好广告营销策略
  • 常用的网站推广方法有哪些销售的三个核心点
  • 胶州网站制作创建网站免费
  • 男人与女人做视频网站重庆seo标准
  • 博达 网站群建设今天最新新闻摘抄
  • 站长seo查询工具写软文用什么软件
  • 阜阳网站建设哪家好app开发成本预算表
  • 怎样拍照产品做网站上海关键词排名优化怎样
  • 一流校建设网站微信营销软件手机版
  • 做网站用什么cms 知乎国际新闻最新消息战争
  • 浙江网站建设哪里有网络宣传
  • 用html5做的旅游网站代码好看的网站ui
  • 产品设计主要学什么seo什么意思中文意思
  • 甘肃网站建设公司电话杭州优化公司哪家好
  • 淘宝网站是谁做的2022年国际十大新闻
  • 在哪学习建网站深圳网络推广解决方案
  • 网上如何做任务赚钱的网站婚恋网站排名前三
  • 福安 网站设计移动慧生活app下载