solr 使用记录 - solr dataimporter 定时任务
2019独角兽企业重金招聘Python工程师标准>>>
下载的包放到tomcat 的solr 应用下。http://yun.baidu.com/share/link?shareid=4280982707&uk=420369067
包中的dataimport.properties 文件放到server/solr/conf目录下。(conf 目录需要自己新建)
修改 dataimport.properties
################################################# # # # 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=core #改成自己的# solr server name or IP address # [defaults to localhost if empty] server=localhost# solr server port # [defaults to 80 if empty] port=8080# application name/context # [defaults to current ServletContextListener's context (app) name] webapp=solr# URL params [mandatory] # remainder of URL params=/core/dataimport?command=delta-import&clean=false&commit=true# schedule interval # number of minutes between two runs # [defaults to 30 if empty] interval=10
需要在数据库表加一个时间戳字段用来增量更新的时候进宪判断。其他字段亦可。
导入数据的配置文件中entity 的deltaQuery="。。。 where last_index_time > ${dataimporter.last_index_time}"
在solr 应用的 web.xml中添加listener
<listener><listener-class>org.apache.solr.handler.dataimport.scheduler.ApplicationListener</listener-class></listener>
转载于:https://my.oschina.net/qzzsunly/blog/401944
solr 使用记录 - solr dataimporter 定时任务相关推荐
- 配置Solr搜索引擎和Solr中文分词库
1.什么是 Solr? 1.1.Lucene['lu:si:n] 介绍 Solr 之前,就不得不提业界大名鼎鼎的 Lucene. Lucene 是一 ...
- solr crud_Spring Data Solr教程:CRUD(差不多)
solr crud 在我的Spring Data Solr教程的上一部分中,我们学习了如何配置Spring Data Solr. 现在该迈出一步,了解我们如何管理Solr实例中存储的信息. 此博客文章 ...
- solr java score_java-Apache Solr:按位运算来过滤搜索结果
我需要过滤与cms中访问权限相对应的solr搜索结果(基于位掩码的drupal 7自定义访问控制机制). 我在tomcat6(在Debian系统上)上使用Solr 3.6.1(/var/lib/tom ...
- curl记录solr删除indexing
记录 sudo curl http://localhost:8080/solr/update?commit=true -H "Content-Type: text/xml" --d ...
- solr mysql_使用Solr索引MySQL数据
环境搭建 2.解压到某个目录 3.cd into D:\Solr\solr-4.10.3\example 4.Execute the server by "java -jar startup ...
- elasticsearch说了一些了,这次说说Solr【入门Solr这篇就够了】
在之前的博客中,我提到过ElasticSearch学习,请先看这一篇(win_Elasticsearch) 并在空闲之余写了一篇关于反向索引和手写分词器,具体在搜索引擎--反向索引原理揭秘及手写ik分 ...
- Spring Data Solr教程:Solr简介
大多数应用程序必须具有某种搜索功能. 问题在于搜索功能通常是巨大的资源消耗,它们可能通过给数据库造成沉重的负担而破坏我们应用程序的性能. 因此,将负载转移到外部搜索服务器是个好主意. 这是我的Spri ...
- php solr 更新数据类型,Solr更新文档数据
使用XML更新文档 以下是用于更新现有文档中的字段的XML文件.将下面的内容保存在名称为update.xml的文件中. 001 Raj Malhotra 9000000000 Delhi 正如上面看到 ...
- solr学习之(七)_学习solr的理由(solr的特点和应用领域)
Solr是一个可伸缩性的.能够即时部署的.致力于信息检索的.可以处理海量信息的.以处理自然语言文本为中心的.检索结果按相关性排序的企业级搜索引擎. Solr处理的业务需求有以下4个特点: 1.无结构化 ...
最新文章
- linux crontab 说明
- 苹果自动驾驶部门「裁员」又「重组」,AI负责人接掌「泰坦」
- SQL:插入指定标识列的数据时候的小错误
- 关于CSS中的相对路径和绝对路径
- 自定义EL函数、自定义JSTL标签
- JSONPATH使用方法
- html scale方法的作用,HTML Canvas scale() 方法
- odd raio值 是什麼_NBA2K20球员能力值又一次更新!
- 揭秘支撑双 11 买买买背后的硬核黑科技!
- 刷题记录 CF每日一题打卡 2020.6月7-6月13
- mac/macbook teamviewer 使用 trackpad 触控板双指滑动出问题/出bug/无法控制/无法滚动/速度过快
- Unicode字符集与多字节字符集
- pyltp安装及运行
- Unity3D学习之旅7-RPG游戏-更新与踩坑实录
- Yet Another Crosses Problem
- 史丰收速算-第五届蓝桥杯省赛
- 电影推介2017-01-07
- 微信小程序上传文件到阿里OSS教程
- 在线生成安卓签名证书
- matlab电流源,DC电压/电流源 GS200