首页 > 开发 > JAVA > 正文

solr搜索两个问题

2017-09-07 08:33:44  来源:网友分享

1.定时增量更新索引不能主动更新,日志显示服务器响应信息为空。

2.我做的是多表定时更新索引,多表都是单表,查询索引时只能查出一张表里面的索引,如:A表name字段"那年,那日"我查询"那年"并不能搜索到"那年,那日",如果B表中也有一个nickname字段"那年,那日"我只能搜索到A表里面的name值,而B表里面的相同nickname值搜索不到

解决方案

问题一已解决,解决方式原来我自己的dataimport.properties文件里的增量索引参数为:
params=/dataimport?command=delta-import&clean=false&commit=true&optimize=false&wt=json&indent=true&verbose=false&debug=false
现在改为:params=/dataimport?command=delta-import&clean=false&commit=true
重做索引参数为:
reBuildIndexParams=/dataimport?command=full-import&clean=true&commit=true&optimize=true&wt=json&indent=true&verbose=false&debug=false
现改为:
reBuildIndexParams=/select?qt=/dataimport&command=full-import&clean=true&commit=true
现在solr能够自动更新MySQL表索引,但是solr服务器响应依然为null

问题二希望大神解答