注意點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" />