I'd go with option 3, and It's what I currently use in many programs. There are some plugins that achieve the same goal. One of it is this but most of them will work fine.
Basically what you will need to do is create the plugin, set it to look at your text field and then set it to some route.
This is some code from some old project I got at hand:
$("input#send_detail_product_id").autocomplete("products/auto_complete_for_send", {
formatItem:formatItem,
callback:processProduct;
});
The plugin I used didn't accept callback functions, so I hacked it a little and work it out. I can send it a function to process after selecting a file.
On the Rails controller, you can specify some logic and return your search results either as JSON or through a View file for formatting issues. In my case, the latter allows me to change how the product name looks.
It's really quite easy to accomplish with the added bonus of dealing with unobtrusive code.