To change the order of products in the search results page and the AJAX live search in PrestaShop, you will need to modify the core code to adjust the sorting behavior. Please note that modifying core files is not recommended, as it may cause issues during future updates.
However, if you still wish to proceed, in the PrestaShop core files, locate the file SearchController.php. This file is usually located in the /controllers/front/ folder. Locate the methods $query->orderBy(...) and variables called $orderBy and Tools::getProductsOrder(...) (for AJAX). Change to your hearts desire, however, using an override is suggested.
Please note, this is based on my memory and it may not be 100% accurate, however, in that case they should be named similar.