With Drupal 7 there is now the search API. Apart from the existing database (that uses the same DB as drupal to index with) and Solr integration there are a few other backend options available too. As the open source community is quite prolific, a few supporting modules to allow fuzzy searching, multi index searching, saved searches, autocompletion, attachment indexing and more have sprung up. See the Search API project page for more detail.
Here's how we set up the database indexing:
Sample code in your .module file for Drupal 7 as follow :-
This Drupal module attempts to provide context for content items by displaying a view block with links to other similar content. Similarity is based on the taxonomy terms assigned to content. Views are available based on similarity within each of the defined vocabularies for a site as well as similarity within all vocabularies.
What does this really mean? How should you use this module?