Naive implementation of OPSSearchEngine algorithm.