Merge "Introduce COLLECT_SEARCH_HISTORY flag"