PDF Optimizer > Discard Objects gets "Discard embedded search index", off
by default. It removes the entries of the catalog's /PieceInfo whose
application name contains "index" in any letter case, such as
IBM-ODIndexes, and removes /PieceInfo when nothing else is left in it.
Other application data and the pages' own /PieceInfo stay. An indirect
/PieceInfo is not edited: the catalog gets a direct copy without those
entries, and other objects that refer to the original keep it. The full
save leaves out the objects that only the removed entries refer to.
doc_optimize takes discard_search_index and reports search_indexes.