1 web.xml中加入

web.xml所在目录 /opt/solr-7.7.1/server/solr-webapp/webapp/WEB-INF

<listener>
<listener-class>
org.apache.solr.handler.dataimport.scheduler.ApplicationListener
</listener-class>
</listener>

2 solr-7.7.1/server/solr/conf中新建dataimport.properties

conf文件夹需要自己新建

#Tue Jun 20 15:31:32 CST 2017

#################################################
# #
# dataimport scheduler properties #
# #
################################################# # to sync or not to sync
# 1 - active; anything else - inactive
syncEnabled=1 # which cores to schedule
# in a multi-core environment you can decide which cores you want syncronized
# leave empty or comment it out if using single-core deployment
#syncCores=coreHr,coreEn,journal,
syncCores=core1,core2 # solr server name or IP address
# [defaults to localhost if empty]
server=localhost # solr server port
# [defaults to 80 if empty]
port=8983 # application name/context
# [defaults to current ServletContextListener's context (app) name]
webapp=solr # URL params [mandatory]
# remainder of URL
#params=/select?qt=/dataimport&command=delta-import&clean=false&commit=true
# 修改请求路径
params=/dataimport?command=delta-import&clean=false&commit=true # schedule interval
# number of minutes between two runs
# [defaults to 30 if empty]
interval=10

3 引入dihs.jar包

/sagesolr/solr-7.2.1/server/solr-webapp/webapp/WEB-INF/lib

4 配置增量索引SQL

solr DIH 设置定时索引的更多相关文章

  1. Solrj和Solr DIH索引效率对比分析

    测试软件环境: 1.16G windows7 x64  32core cpu . 2.jdk 1.7  tomcat 6.x  solr 4.8 数据库软件环境: 1.16G windows7 x64 ...

  2. solr DIH 知识梳理

    solr DIH 知识梳理 web.xml中listener配置 <listener> <listener-class>org.apache.solr.handler.data ...

  3. 企业级搜索引擎Solr 第三章 索引数据(Indexing Data)[1]

    转载:http://quweiprotoss.wap.blog.163.com/ Push data to Solr or have Solr pull it 尽管一个应用通过HTTP方式与Solr通 ...

  4. 企业级搜索引擎Solr 第三章 索引数据(Indexing Data)[1] (转)

    Index Data Author: David Smiley Eric Pugh 译者:Koala++ / 屈伟 在这一章中我们将了解如何将数据传入Solr.这个传入的过程称之为索引,尽管中间还包含 ...

  5. Solr系列四:Solr(solrj 、索引API 、 结构化数据导入)

    一.SolrJ介绍 1. SolrJ是什么? Solr提供的用于JAVA应用中访问solr服务API的客户端jar.在我们的应用中引入solrj: <dependency> <gro ...

  6. Solr5.0.0 DIH之增量索引

    定时索引相关知识 增量更新需要配置个sql(deltaImportQuery.deltaQuery) deltaImportQuery="select * where id='${dih.d ...

  7. .Net程序员 Solr-5.3之旅 (三)Solr 从MSSQ导入索引数据

    阅读目录 引言 准备工作 data-config.xml schema.xml 导入数据 结尾 附件下载 引言 Other men live to eat, while I eat to live.- ...

  8. Solr 07 - Solr从MySQL数据库中导入数据 (Solr DIH的使用示例)

    目录 1 加入数据导入处理器的jar包 2 加入数据库驱动包 3 配置solrconfig.xml文件 3.1 配置lib标签 - 加入驱动jar包 3.2 配置requestHandler标签 - ...

  9. CDH使用Solr实现HBase二级索引

      一.为什么要使用Solr做二级索引二.实时查询方案三.部署流程3.1 安装HBase.Solr3.2 增加HBase复制功能3.3创建相应的 SolrCloud 集合3.4 创建 Lily HBa ...

随机推荐

  1. 用注解@DelcareParents实现引用增强

    引用增强,是一个比较特殊的增强,不同于其他方法级别的增强. 引用增强可以实现:一个Java类,没有实现A接口,在不修改Java类的的情况下,使其具备A接口的功能. 先看看背景,我们有个Love接口: ...

  2. mysql 定时任务和存储过程

    mysql 定时任务和存储过程 最近在做日志系统,中间用到了 mysql, 其中有一个要求: 把数据库中 7天之后的日志清除了.看到 mysql 也支持 定时任务.于是就用 mysql 来做了.下面就 ...

  3. kafka基础五

    Kafka与Zookeeper Zookeeper存储了什么 kafka架构中角色: 1.producer: 消息生产者,发布消息到 kafka 集群的终端或服务. 2.broker: kafka 集 ...

  4. 兼容IE的滚动条自定义样式

    废话不多说,直接上: IE专属的滚动条样式定义,只能设置各种原始结构的颜色,宽高结构等其他样式无法修改: div{ scrollbar-arrow-color: red; /*三角箭头的颜色*/ sc ...

  5. Objective-C Fast Enumeration

    Fast enumeration is an Objective-C's feature that helps in enumerating through a collection. So in o ...

  6. github入门之创建仓库--3

    1.登陆到github,点击加号中的New repository 2.设置仓库信息 *注: ------Description:添加仓库说明,不是必填项 ------Public.Private:选择 ...

  7. IOS画线条

    - (void)drawRect:(CGRect)rect { // draw a rounded rect bezier path filled with blue CGContextRef aRe ...

  8. MySQL字符集和排序介绍

    客服端字符集: character_set_client utf8mb4连接字符集: character_set_connection utf8mb4数据库字符集: character_set_dat ...

  9. GP SQL 优化

    1.收集统计信息vacuum full analyze ZCXT.ZCOT_PS_PROJECT; 2.检查表的数据量分布select gp_segment_id,count(*) from fact ...

  10. mongo ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused

    解决方法 rm /var/lib/mongodb/mongod.lock