我是solr和solr-4.6.0的新手。 設置後,我可以將文檔添加到索引。但是現在我想爲搜索字段和更新的schema.xml添加詞幹過濾器。 爲了讓它工作,我需要在我的本地機器上重新索引solr,然後才能在產品中進行更改。 Google-d提供了一套完整的步驟或程序,但沒有得到任何滿意的方法。 有人可以提供步驟嗎?完成模式更改時重新索引solr的完整步驟
1
A
回答
1
您只需再次運行相同的索引命令。任何具有相同唯一ID(如schema.xml中定義的)都將在提交時被覆蓋。如果你想幹淨的啓動,你可以停止實例並刪除整個索引目錄或運行delete all命令。
1
Ok, now I've moved 2 steps forward. I've created data-config.xml and put SolrEntityProcessor as datasource as I don't want to delete and re build the index. Solr reload is working fine, but on runing fulldata import, it throws error. Here are the files:
data-config.xml:
<dataConfig>
<document name="SolrIndex">
<entity name="SolrIndex_Data" processor="SolrEntityProcessor" url="http://quovantis-hp-15-notebook-pc:8081/solr-4.6.0/#/collection1" query="*:*"/>
</document>
</dataConfig>
solr-config.xml:
<config>
<lib dir="../../dist/" regex="apache-solr-dataimporthandler-\d.*\.jar" />
<lib dir="../../contrib/dataimporthandler/lib/" regex=".*\.jar" />
</config>
schema.xml:
<schema name="example" version="1.5">
<fields>
<field name="entityData" type="text_stem" stored="true" indexed="true" multiValued="false" />
</fields>
<types>
<fieldType name="text_stem" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords.txt"
enablePositionIncrements="true"
/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.PorterStemFilterFactory" />
</analyzer>
0
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords.txt"
enablePositionIncrements="true"
/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
</fieldType>
</types>
Error:
{
"responseHeader": {
"status": 0,
"QTime": 0
},
"initArgs": [
"defaults",
[
"config",
"data-config.xml"
]
],
"command": "status",
"status": "idle",
"importResponse": "",
"statusMessages": {
"Time Elapsed": "0:0:22.403",
"Total Requests made to DataSource": "0",
"Total Rows Fetched": "0",
"Total Documents Processed": "0",
"Total Documents Skipped": "0",
"Full Dump Started": "2014-09-10 14:55:03",
"": "Indexing failed. Rolled back all changes.",
"Rolledback": "2014-09-10 14:55:04"
},
"WARNING": "This response format is experimental. It is likely to change in the future."
}
I've followed some post to run this. Not sure where the issue is.
相關問題
- 1. 模式更改後的Solr重新索引
- 2. 重置引導模式如果不是所有表單步驟都完成
- 3. 完成MongoDB Map-Reduce步驟
- 4. Apache solr與完整索引數據的查詢完全匹配
- 5. Solr搜索完整標題
- 6. 如何知道solr的dataimporthandler何時完成索引?
- 7. 模型創建完成後,searchkick是否自動更新索引?
- 8. Solr更新索引
- 9. SonarQube無法完成構建後步驟
- 10. Unix步驟將不會完成
- 11. 春季批次+完成某個步驟
- 12. 「完成」值何時更改?
- 13. 多個異步完成處理程序完成後更新UI
- 14. UITableView何時完成更新?
- 15. 在沒有完整重新索引的情況下更新Lucene有效載荷
- 16. 自動完成UITextField異步更新UITableView
- 17. 這個代碼可以用更少的步驟完成嗎?
- 18. AsyncTask完成後重新啓動完整的Android應用程序
- 19. 如何使SpecFlow VS自動完成尊重步驟範圍?
- 20. Solr重新索引行爲
- 21. 重新索引SOLR文檔
- 22. Apache Solr搜索自動完成
- 23. TeamCity同步構建步驟或等待一步完成
- 24. 完整和完整的二叉樹最大和最小索引?
- 25. 從Lucene索引更新Solr索引
- 26. 導致完整Zeus重啓的模型更改
- 27. Drupal索引不會完成
- 28. 獲取NSTextField完成索引
- 29. Elasticsearch從未完成索引
- 30. Solr - 索引自動更新
謝謝@Alexandre。我正在尋找完整的命令來執行。 – 2014-09-10 09:03:42