Forcemerge function in Indexwriter class

流过昼夜 提交于 2019-12-10 19:09:15

问题


I wanted to know about a function in Solr3.5.0 in the IndexWriter class. can anyone let me know what exactly the forceMerge() function does. Does it optimize the segments?

Thanks,

Jeyaprakash


回答1:


Yes, forceMerge is the successor of optimize. There are two main reasons for this renaming:

  • Lucene multi-segment performance has increased a lot over the last years,
  • Giving a less cool name to this method will prevent users from thinking that this method does some kind of magic and that any index is sub-optimal until this method has been called.

You can read more about this renaming at https://issues.apache.org/jira/browse/LUCENE-3454



来源:https://stackoverflow.com/questions/9483083/forcemerge-function-in-indexwriter-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!