I am using the following code to limit the fields that woocommerce searches in when you search for an order - [login to view URL]
This limits the search fields to Order ID, company and email only, speeding up order search.
1. I need to have a dropdown along with the search field which will have Order ID, Billing Company, Billing Email as values. If we select Order ID, then the search should happen in Order IDs(_order_key) only, if we select Billing Company, then the search should happen in Billing Company(_billing_company) field only and so on.
2. This needs to be done via function only - I don't want to edit core wordpress/woocommerce files.