Solr的DatePointField是否可以替代TrieDateField?

时间:2018-10-23 14:51:09

标签: solr solrcloud solrconfig

我在Solr 7.5安装中收到一些弃用警告:

[ WARN] 16:38:36  Solr loaded a deprecated plugin/analysis class [solr.TrieIntField]. Please consult documentation how to replace it accordingly. []
[ WARN] 16:38:36  Solr loaded a deprecated plugin/analysis class [solr.TrieFloatField]. Please consult documentation how to replace it accordingly. []
[ WARN] 16:38:36  Solr loaded a deprecated plugin/analysis class [solr.TrieLongField]. Please consult documentation how to replace it accordingly. []
[ WARN] 16:38:36  Solr loaded a deprecated plugin/analysis class [solr.TrieDoubleField]. Please consult documentation how to replace it accordingly. []
[ WARN] 16:38:36  Solr loaded a deprecated plugin/analysis class [solr.TrieDateField]. Please consult documentation how to replace it accordingly. []
[ WARN] 16:38:36  Solr loaded a deprecated plugin/analysis class [solr.LatLonType]. Please consult documentation how to replace it accordingly. []
[ WARN] 16:38:37  Solr loaded a deprecated plugin/analysis class [solr.WordDelimiterFilterFactory]. Please consult documentation how to replace it accordingly. []
[ WARN] 16:38:37  Solr loaded a deprecated plugin/analysis class [solr.SynonymFilterFactory]. Please consult documentation how to replace it accordingly. []

documentation只是告诉我Trie *已过时,除以下内容外,我找不到迁移指南:

TrieDateField: Deprecated. Use DatePointField instead.

我可以只替换Trie *字段类型类并更新正在运行的Solr实例上的架构吗?

那这里提到的非Trie字段呢?

1 个答案:

答案 0 :(得分:2)

它们是否要更换,取决于您的使用情况,但是是的,它们应该做同样的事情,只是效率更高。不过,您 必须在更改类型后重新索引-您不能只更改架构并假设现有数据将按预期工作(因为最终将使用不同的数据类型)在进行遍历文档的操作时)。

对于过滤器,它们已被对应的Graph(SynonymGraphFilter和WordDelimiterGraphFilter)取代。

LatLonType已替换为LatLonPointSpatialField。

您可以看到这些changes in Major Changes in Solr 7的列表。

  

如果在架构中使用Trie *字段,则应考虑尽快迁移到PointFields。更改为新的PointField类型将需要您重新索引数据。