Solr:在中更改MaxFieldLength的默认值(Solr: change default value of MaxFieldLength in )

有没有办法更改solarconfig.xml文件中的默认<mainIndex><maxFieldLength>值,以便在创建Solr集合时,所有集合都将使用新值?

对于大多数应用程序,默认值10000是可以的,但我使用的大多数PDF都超过100页。 客户担心搜索结果不会返回包含给定关键字的每个PDF。 如果我错了,请纠正我,但我很确定maxFieldLength将索引限制为仅仅是PDF的一小部分。

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.

最满意答案

请注意, <maxFieldLength>限制了令牌的数量,而不是索引的字符数。 有关此问题的讨论,请参阅 - http://lucene.472066.n3.nabble.com/maxFieldLength-td490843.html 。

更新:之前我不正确,为了更改所有集合的此值,您需要在solr.xml文件中添加一个属性,如Solr.xml中所示。 然后,可以在每个核心/集合的solrconfig.xml文件<maxFieldLength>设置中引用该属性。

但是,我不确定如何将其纳入ColdFusion实现中,因为我不熟悉CF的工作原理。 它可能需要保持手动过程。

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.

更多推荐