I have a search text field that contains all the search terms. I'm taking user input and breaking it up into tokens of term1, term2, term3, etc and the then submitting to Dismax.
q=search_text:term1* AND search_text:term2* AND search_text:term3* This works great. The problem is when a user mistypes a term. Then nothing is found. This is not good. To address this I'm now doing OR instead q=search_text:term1* OR search_text:term2* OR search_text:term3* Now a mistyped term is no problem. I still get results. The issue now is that I get too many results back. What I want is something that effectively does an AND if a term is matched, but does an OR when a term is not found. To say it a differnt way -- If a term is found I only want results that contain that term. I've tried many different boolean expressions to no success. I've spent hours searching for a solution, but so far I've not found the answer. I feel that there is a simple solution, so I'm hoping that someone can enlighten me here. -- View this message in context: http://lucene.472066.n3.nabble.com/Help-with-Query-syntax-How-to-make-a-query-that-works-in-between-AND-and-OR-tp4009451.html Sent from the Solr - User mailing list archive at Nabble.com.