refactored run-search
refactored run-search, using insert-batch instead of map and doall