On 1/31/24 21:59, Anuj Bhargava wrote:
Why does *Optimize* in the *dataimport* section of solr Admin UI duplicate the records. A new copy is created of each record. "*id*" and "_*version*_" are different, everything else is the exact copy. Each time I run Optimize, the initial number of records get added again. Initial number - *Num Docs:393112*, after 1st optimization - *Num Docs:786224* and after running the optimization again - *Num Docs:1179336*
Optimize doesn't change anything about the index other than rebuilding it entirely without documents that have been deleted. Num Docs won't change.
But if you are running dataimport that includes an optimize, THAT would probably change the index.
To verify that what I say is true, manually kick an optimize off when you're NOT doing an import. If your index is named XXX, this command would do it:
curl "http://hostname:port/solr/XXX/update?optimize=true" An optimize is a slow operation. Thanks, Shawn