We have tens of thousands of authors in the database and there are sometimes over 100 books published by a single author. Each specific type of book is uniquely identified by ISBN.
I want to create a single search box (currently there are several) in which the user can start entering either the book name or the author name or the isbn. The goal is to select a specific ISBN, from which book name and author names follow. Note that there are different formats for the same work, so ISBNs will differ depending on the book format, etc. The page will show all of the three selected values somewhere, but ISBN will be considered an authoritative key. A user would enter an Author's name if they do not remember the exact name of the book.
I am using an http://jqueryui.com/autocomplete/ widget which can trigger search on any minimum number of characters that the user has typed. Right now the threshold is 3, but some book names (albeit few) have only two characters in them, and so do some authors (I know, weird). The search results are backed by a web service that ends up querying the database. I have a lot of flexibility in terms of how the web service should function. For example, if the user has entered fewer than 3 characters, I can perform exact match only. If the user has typed 3 or more, I can match on anything that starts with those characters. If the user has typed 7 or more characters, then I can search for anything that contains them. I could even employ something based on the Levenshtein distance in the future, since the database provides this functionality.
Using the Autocomplete widget I can also format rows that come back as a table, so I can show Author, Book name, ISBN and other relevant info on the same line.
My biggest question is - how to present the results back to the user most optimally? What if I type a string and it matches both part of the isbn and the book name? What if it matches both the author name and the book name? I suppose, if the search input is all numeric (or has numbers and dashes), then I can first treat it as isbn and bring those results at the top. What if the user typed "Aristotle" - are they searching for books written by Aristotle or about Aristotle - e.g. author name or book name?
I suppose I could compute results in all three buckets and then present the smallest bucket first, or have some rules that decide which bucket should be presented first as a function of three numbers. I could try to visually separate the three buckets with something like an http://jqueryui.com/accordion/ widget with a table inside of each of its three sections. Or I could lump things all together. I could let the user do a more advanced search where they get to toggle three check-boxes. They could also specify the minimum length after which I should start performing a wildcard search anywhere in the middle of a string and not just the beginning.
However, some who understand UX opine that preferences are a cop-out. http://gettingreal.37signals.com/ch06_Avoid_Preferences.php
I can see their point.
My question is a bit vague. I want to provide the best user experience for the users who are searching for a book. Google and Amazon and others make it seam so easy. I want to be able to offer the same ease of use.
Any suggestions? Any questions?