Better autocomplete

Below, I describe what I think is a better way to do autocompleting search queries on the iPhone. I put together a demonstration app which you can found on Github.

I feel there is a lot to be improved in autocomplete on the iPhone. I often find myself frustrated with how hard it is to use autocomplete for queries of multiple words. For example, I would like to search for “apple store opening hours”.

In Safari, after typing the first character I would get this:

Great, you would think: it completed the first word correctly with just the first character. But no! You can’t use it. If you tap it it will send a search for ‘apple’ to Google and dismiss the keyboard. Meaning you will have to re-tap on the search bar to complete our query. Because of this, I usually just type the whole query manually. Not great.

Google does this a little better in their app:

Tapping the suggestion leads to the same behaviour as in Safari, but the arrow on the right lets you use the result in your query. This is nice! There aren’t really any downsides, but I think it could be a bit better. I think it isn’t obvious what the arrows do and that they are not really necessary.

Instead I propose the following. Again, when I type the first character, ‘apple’ is suggested.

When I tap the word, two things happen. Firstly the word (plus a space) is inserted in the search bar so I can continue my query. Secondly, the search is submitted to, in this case, Google and the results are shown where they normally would be. This is important. The user can now decide what to do. He/she can continue typing a longer query, or scroll the content. The keyboard is dismissed as soon as the content is scrolled, so no extra taps are necessary.

Ofcourse, we continue typing until we end up with ‘apple store opening hours’.

Be sure to check out the demonstration project on Github.

I think this is a natural approach for autocomplete and am very curious what you think. Let me know on Twitter!