是否可以在不从原始源重新索引的情况下更改 Solr 中模式中指定的分析器? [英] Is it possible to change the analyzer specified in the schema in Solr without reindexing from the original source?

查看:17
本文介绍了是否可以在不从原始源重新索引的情况下更改 Solr 中模式中指定的分析器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Solr 中,如果模式中有一个字段为 stored="true",并且我们更改了与该字段关联的分析器,是否可以仅更新该字段而不重新索引所有文档?这是否可以在不返回原始数据源的情况下使用带有新分析器的字段的存储"值来完成?

In Solr, if we have a field in the schema with stored="true", and we change the analyzer associated with that field, is it possible to update just this field without reindexing all the documents? Could this be done using the "stored" values of the field with the new analyzer without going back to the original data source?

推荐答案

伙计,我优化了你的代码.

Guy, I optimized your code.

    ...
    while (iter.hasNext()) {
        ...
        //server.deleteById(id) ;
        //server.commit() ;

        Collection<SolrInputDocument> docs = new ArrayList<SolrInputDocument>();
        docs.add(inputdoc) ;
        server.add(docs) ;
        // server.commit() ;
    }
    server.commit() ;

这篇关于是否可以在不从原始源重新索引的情况下更改 Solr 中模式中指定的分析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆