注意点1–注意重启
- 当修改了配置文件后,一定要重启Solr才能生效;
- 自动补全时,插入新数据后,一定要重新build,即勾选“spellcheck”及下面的“spellcheck.build”并执行即可,此时会对所有数据更新index。
注意点2–注意延迟
有时候执行某些操作(比如新增/删除数据)后,刷新界面并不能看到最新信息,请稍微等待即可。
注意点3–小心覆盖
若导入如下的csv文件,则后一条记录会覆盖掉前一条,因为id相同。
id,file_path
908209415,"world1"
908209415,"world2"
注意点4–至少得有_version_
字段
在schema.xml可以将所有不需要的字段删除,只保留所需的字段即可,但会在create collection时报错
_version_ field must exist in schema, using indexed="true" or docValues="true", stored="true" and multiValued="false" (_version_ does not exist)
解决办法:增加_version_
字段
<field name="_version_" type="long" indexed="true" stored="true" />