且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Solr:使用DataImportHandler在索引时设置字段增强

更新时间:2022-05-28 21:50:39

不幸的是,除非您在实体中指定了静态增强值,否则不支持变压器中每个字段的动态增强.有一种方法可以设置文档增强功能,但是它将影响文档中的所有字段,例如:

Unfortunately there is no support for dynamic boosting per field in the transformer, unless you specify a static boost value in the entity. There is a way to set a document boost, but it will affect all the fields in the doc like:

 row.put('$docBoost', row.get('boost'));

如果这不是您所需要的,我建议您查看提高查询时间,因为您已经存储了提升"字段.

If this is not what you need I would recommend to look at the query time boosting since you already store the "boost" field.