solr原子更新-即指定更新某个字段的值
2016-09-20 00:00
225 查看
官方文档:https://wiki.apache.org/solr/Atomic_Updates
SolrInputDocument solrInputDocument = new SolrInputDocument();
solrInputDocument.addField("id", id);
Map<String, String > operation = new HashMap<>();
operation.put("set", "test1");
solrInputDocument.addField("title", operation);
solrServer.add(solrInputDocument);
solrServer.commit();
官方文档中,要注意:
The core functionality of atomically updating a document requires that all fields in your SchemaXml must be configured as stored="true"
solr原子更新,支持store=true,如果store为false,更新后字段会丢失。
SolrInputDocument solrInputDocument = new SolrInputDocument();
solrInputDocument.addField("id", id);
Map<String, String > operation = new HashMap<>();
operation.put("set", "test1");
solrInputDocument.addField("title", operation);
solrServer.add(solrInputDocument);
solrServer.commit();
官方文档中,要注意:
The core functionality of atomically updating a document requires that all fields in your SchemaXml must be configured as stored="true"
solr原子更新,支持store=true,如果store为false,更新后字段会丢失。
相关文章推荐
- solr原子更新-即指定更新某个字段的值
- Solr局部或指定字段更新之set用法
- Java并发编程札记-(三)JUC原子类-05原子方式更新类的指定volatile字段
- solr增量更新的字段
- solr原子更新,包括4.X/5.X
- 只更新指定字段
- mysql存储过程(更新指定字段的数据)
- MYSQL 全表按照Key字段更新指定的字段
- 新问题新方法:在Entity Framework中实现指定字段更新
- solr的原子更新
- 使用solrj和EasyNet.Solr进行原子更新
- Hibernate 更新指定字段的内容
- 更新所有指定表时间字段及增加一天存储过程
- Solr 部分 局部字段修改 更新 删除
- SQL两表匹配,将A表的指定字段所有内容根据条件更新B表指定字段的所有内容
- Thinkphp中如何书写按照指定字段同步更新的ORM
- 更新数据库所有表的某一个指定字段 ,附加对‘将 varchar 值转换为数据类型为 int 的列时发生语法错误’处理方法
- EF指定更新字段,强类型,有提示
- EF中更新指定字段
- solr/solrj之原子更新