Revert "Search results ordering fix, Config generation fix"

This reverts commit 249d82f5bdc3c9c926b24bba7fae93e7d11a2fbc.