added logging for search queries and changed searcha pi to swap to and from positions,0th index stores to and 1st index stores from locations