Changed search.py to use json rather than pickle for easier switchover to postgresql