In Chapter 6, we built a simple search feature into our project. We did so to learn more about AJAX and live form processing. The search page returns bookmarks that contain the query string in the title and it is implemented using the
filter method of the model API. This line of code does the actual searching in our search view:
bookmarks = Bookmark.objects.filter(title__icontains=query)
This was sufficient to get a basic search page working. However, things are not this simple in reality. To see why, let's say that a user entered "AJAX advantages" into the search box. If the database contains a bookmark with the string "AJAX advantages" in its title, it will be returned in the search results. However, if there is a bookmark titled ...