Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
由于内存不足,我想强制 solr 将索引写入硬空间并且不在内存中保持文件打开,我该如何在 solrj 中做到这一点?我在每个被索引的文档之后添加 solr.commit() 但它不起作用
几个指针: -
立即提交数据使用 -
req.setAction( UpdateRequest.ACTION.COMMIT, false, false );
或者
solr.commit(false, false)
参数是 waitFlush 和 waitSearcher,默认为 true,需要设置为 false。
还要重新访问 solrconfig.xml 中 maxBufferedDocs 和 ramBufferSizeMB 的配置