Solr: change default value of MaxFieldLength in <mainIndex>

∥☆過路亽.° 提交于 2019-12-11 10:32:40

问题


Is there a way to change the default <mainIndex><maxFieldLength> value in the solarconfig.xml file, so that when a Solr collection is created ALL collections will use the new value?

The default value of 10000 is okay for most applications, but most of the PDFs I am working with are over 100 pages. The client is concerned that the search results do not return EVERY PDF containing the given keywords. Correct me if I'm wrong, but I'm pretty sure that the maxFieldLength is limiting the indexing to just a fraction of the PDFs.


回答1:


Please note that <maxFieldLength> is restricting the number of tokens, not characters that are indexed. See - http://lucene.472066.n3.nabble.com/maxFieldLength-td490843.html for a discussion around this.

Update: I was incorrect previously, in order to change this value for all collections, you will need to add a property to your solr.xml file as shown in Solr.xml. That property can then be referenced in your solrconfig.xml file <maxFieldLength> setting in each core/collection.

However, I am not sure how this would be incorporated into the ColdFusion implementation as I am not familiar with how CF works. It may need to remain a manual process.



来源:https://stackoverflow.com/questions/15296356/solr-change-default-value-of-maxfieldlength-in-mainindex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!