7

We would like to provide our tables with generic search field that will filter entries where at least one of the columns contains the input text. We also think of providing auto-completion for this search field in some way or another. To make it clear, it is the kind which filter/auto-complete while (user is) typing.

My questions: is there a recommended minimum characters limit before the filtering mechanism gets into action?

Case there is no performance issue with searching a single character, should there be a minimum anyway? or that this practice became common due to performance issues.

3

It depends on the specific use case, but there is no agreed-upon minimum number of characters that is required before doing filtering. If too many results can get returned, limit the initial set, preferably to the most likely (if that can be determined), or some other metric like most recent. If you use Chrome, go ahead and try it. Enter a single character in your URL bar and you are going to get results. It makes sense there because it can come up with good suggestions even with a single character.

The rule of thumb I would use is that (absent of performance considerations) the optimal number depends on how many characters are needed for your algorithm to come up with suggestions that the user will find useful.

  • Agreed, if a huge unusable list shows first then the user is better off entering 2-3 chars first to limit the list down initially. – Nathaniel Flick Aug 15 at 0:01
8

Frankly, this is contextual. For a single word, generally 2-4 letters are kept as minimum to initiate the auto complete feature. There are at least two reasons for this.

One being the performance as you pointed out. There is no need to fire up a filtering call when you know that the resultant dataset will be huge.

Second being, the number of results you want to show to reduce user's cognitive load. The auto complete information you offer should be directly helpful to the user, until then it is just a distraction. Just because we can, we should not start suggesting A for Apple and A for Ammunition at the same time.

In order to reduce this cognitive load, parameters such as reducing the list to five likely words, and having a vertical layout of those words may be used. - Wiki, Original Reference is a 1985 paper, I could not find it to link here.

First three letters serve two purposes. They narrow down results to manageable limits at the same time suggesting things to the users that matter.

Having said that, when I say it is contextual, it means when there are two many entries having a common set of chars. If that is the business case then that should be factored in.

3

Just a note to add to @merqri answer: you may consider a feature, in which user typing a filter string gets information (it can be an approximation), how many results there are.

If the number of results is narrowed down to eg. five, you may show them even after two characters.

Take a look at MS Excel autocomplete feature: you have some texts (strings) in cells above the one the user is in. If he starts typing, the autocomplete is activated, but only if there is exactly one result to match from previous entries. For example, if you have month names, if you type F it is enough to complete to February, but you must type Jun to get June, because Ju is in both June and July, and J alone is also valid for January. Similar is for March and May (two first characters common) and April and August (only the very first).

So if you are able to have good performance in filtering on the fly, do not be afraid to start matching even after the first character user types. It is also an information for him that he is typing correctly, that it makes sense. You may inform user eg. Found ca. 2,500 matches. Type more characters to narrow down search results.

2

A difference should be made between exact results for auto-completion/filter and inexact.

A colleague complained to me that in most cases it is very dificult for him to look for or use/mention his own profile on many sites, because when he has completely typed his name, auto-complete doesn't kick in. His name is Li. One of the most used names around the world.

So you should start looking for exact results as soon as there is something typed in (or maybe if at least 2 characters are typed).

Inexact search results should be started if the expected number of results is small enough. If you show m results from a total of n possibilities for auto-complete/filter, than as a raw estimate use m >= log_a(n) where a is the alphabet size typically used in results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.