Be careful. Lucene is not always the best answer.
If your only search in one limited field and search only for a word, such as a restaurant, then lucene, which is really intended to mean large texts / documents, may be excessive, you can get the same effect by splitting the title.
function(doc){ var stringarray = doc.title.split(" "); for(var idx in stringarray) emit(stringarray[idx],doc); }
Also, Lucene and Couchdb do not support substring search where the string is not at the beginning of the word.
source share