solr增量更新

chencongbin5 2016-07-22 11:33:57
更新前可以查到数据 更新后就查不到了 ?
data-config.xml

<entity name="iczshuxue" pk="t_uuid"
query="SELECT knowledge_id, content, t_uuid, degree degree_enum,
type type_enum, label, options,'iczshuxue' table_name,
q_type child_type,children_id,s_content,s_options,updateTime
FROM iczshuxue where state != -1 "
deltaImportQuery="SELECT knowledge_id, content, t_uuid, degree degree_enum,
type type_enum, label, options,'iczshuxue' table_name,
q_type child_type,children_id,s_content,s_options,updateTime
FROM iczshuxue where state != -1 and t_uuid='${dataimporter.delta.id}'"
deltaQuery="SELECT t_uuid FROM iczshuxue where state != -1 and updateTime>'${dataimporter.last_index_time}'">
<field column="content" name="edu_title" />
<field column="options" name="edu_content" />
<field column="label" name="edu_label" />
<field column="degree_enum" name="edu_difficulty" />
<field column="type_enum" name="edu_type" />
<field column="t_uuid" name="edu_ques_id" />
<field column="knowledge_id" name="edu_knowledge_id" />
<field column="table_name" name="edu_table" />
<field column="children_id" name="edu_child_id" />
<field column="child_type" name="edu_child_type" />
<field column="s_content" name="s_edu_title" />
<field column="s_options" name="s_edu_content" />
<field column="updateTime" name="updateTime"/>
</entity>

首先fullimport
结果:

Indexing completed. Added/Updated: 1406 documents. Deleted 0 documents. (Duration: 02s)
Requests: 1 (1/s), Fetched: 1406 (703/s), Skipped: 0, Processed: 1406 (703/s)
Started: 2 minutes ago

查询 有数据

然后数据库加了一条记录
然后我跑url :xxxxxxxxx/solr/dataimport?command=delta-import 回去查数据 并没有什么卵用
solr 的log的日志 是这样的

2016/7/22 上午11:07:36
WARN
null
SimplePropertiesWriter
Unable to read: dataimport.properties

用下面这种方式delta-import

查询结果变空了:


...全文
271 回复 打赏 收藏 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

703

社区成员

发帖
与我相关
我的任务
社区描述
提出问题
其他 技术论坛(原bbs)
社区管理员
  • community_281
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧