zoukankan      html  css  js  c++  java
  • Solr4.10.4 加中文分词

    ik分词插件下载地址:

    https://download.csdn.net/download/u014453536/9587721

    接上一教程,这个教程如何配置中文ik分词

    检查schema的管理模式

    配置成经典模式

     <!-- 经典模式 -->
     <schemaFactory class="solr.ClassicIndexSchemaFactory"/>
      
    <!--修改节点 updateRequestProcessorChain-->
    <updateRequestProcessorChain name="add-unknown-fields-to-the-schema" default="${update.autoCreateFields:true}" processor="uuid,remove-blank,field-name-mutating,parse-boolean,parse-long,parse-double,parse-date">
        <processor class="solr.LogUpdateProcessorFactory"/>
        <processor class="solr.DistributedUpdateProcessorFactory"/>
        <processor class="solr.RunUpdateProcessorFactory"/>
      </updateRequestProcessorChain>

     解压分词工具包,把IKAnalyzer2012FF_u1.jar文件复制到lib目录见图

    重命名文件managed-schema为schema.xml

    增加ik分词配置

     <field name="my_name" type="text_ik" indexed="true" stored="true"/>

    <fieldType name="text_ik" class="solr.TextField">   
       <analyzer type="index" isMaxWordLength="false" class="org.wltea.analyzer.lucene.IKAnalyzer"/>   
       <analyzer type="query" isMaxWordLength="true" class="org.wltea.analyzer.lucene.IKAnalyzer"/>   
      </fieldType>

    配置好以后重启tomcat服务

  • 相关阅读:
    网页基本信息
    3.ThinkPHP入门---视图
    2.TinkPHP入门----控制器
    1.Thinkphp入门--框架介绍
    C#生成二维码
    .net mvc中的表单异步提交
    .net MVC中异常日志
    .net导入excel数据到数据库中
    执行带返回参数的存储过程
    Jquery客户端校验——jquery.validate.js
  • 原文地址:https://www.cnblogs.com/ff111/p/11324288.html
Copyright © 2011-2022 走看看