As Erick points out, you don't want a random doc as response! What you're looking at is how to avoid the "0 hits" problem. You could look into one of these: * Introduce autosuggest to avoid many 0-hits cases * Introduce spellchecking * Re-run the failed query with fuzzy turned on (e.g. alpha~) * Redirect user to some other, broader source (wikipedia, google...) if relevant to your domain. No matter what you do, it is important to communicate it to the user in a very clear way.
-- Jan Høydahl, search solution architect Cominvent AS - www.cominvent.com On 11. sep. 2010, at 19.10, Satish Kumar wrote: > Hi, > > We have a requirement to show at least one result every time -- i.e., even > if user entered term is not found in any of the documents. I was hoping > setting mm to 0 will return results in all cases, but it is not. > > For example, if user entered term "alpha" and it is *not* in any of the > documents in the index, any document in the index can be returned. If term > "alpha" is in the document set, documents having the term "alpha" only must > be returned. > > My idea so far is to perform a search using user entered term. If there are > any results, return them. If there are no results, perform another search > without the query term-- this means doing two searches. Any suggestions on > implementing this requirement using only one search? > > > Thanks, > Satish