better documentation
fixes crash when searching after trying to insert image with duplicate id. Suggested by https://github.com/nicsor