We do this on the client side with multiple queries. It is fairly efficient, 
because most responses are from the first, exact query.

wunder

On Apr 9, 2013, at 6:15 AM, Koji Sekiguchi wrote:

> Hi Mark,
> 
> > Is it possible to do a conditional query if another query has no results?  
> > For example, say I want to search against a given field for:
>> 
>> - Search for "car".  If there are results, return them.
>> - Else, search for "car*" .  If there are results, return them.
>> - Else, search for "car~" .  If there are results, return them.
>> 
>> Is this possible in one query?  Or would I need to make 3 separate queries 
>> by implementing this logic within my client?
> 
> As far as I know, there is no such SearchComponent.
> But the idea of "FallbackRequestHandler" has been told, see SOLR-1878, for 
> example:
> 
> https://issues.apache.org/jira/browse/SOLR-1878
> 
> koji
> -- 
> http://soleami.com/blog/lucene-4-is-super-convenient-for-developing-nlp-tools.html





Reply via email to