Multiselect with custom ranking algorithm

Hello!
I’ve programmed a search engine with a custom mechanism. The first version of it shows it’s results in the form of topics after the text input.
I’d like to do it using only one widget: the multiselect.

The user experience would be: type de condition searched, the dropdown list shows the list of related options ranked through the search algorithm, the user selects the option and he can do this for as many options as he wants.

Here is the link for my app.

ICPC-2 search engine - portuguese

It’s an app for searching ICPC-2 codes in portuguese, a codification used by primary health care workers. You type in your way, the app finds the correct code for that condition. Is that simple. But I’d like to do it in a more concise way. The plan is to integrate it in a electronic medical record in a easy, efficient, user friendly way, with minimal number of clicks.

I already have the ranking algorithm and a working search engine.