Master fix non external collection

Maybe someone that has a better knowledge of `search_engine.py` could take a look at it