Separated index building and querying. It now search much faster.