Bumping this one, any suggestions? Looks like if() and exists() are meant to solve this problem, but I am using it in a wrong way.
-Utkarsh On Thu, Oct 17, 2013 at 1:16 PM, Utkarsh Sengar <utkarsh2...@gmail.com>wrote: > I trying to do this: > > if (US_offers_i exists): > fq=US_offers_i:[1 TO *] > else: > fq=offers_count:[1 TO *] > > Where: > US_offers_i is a dynamic field containing an int > offers_count is a status field containing an int. > > I have tried this so far but it doesn't work: > > http://solr_server/solr/col1/select? > q=iphone+5s & > fq=if(exist(US_offers_i),US_offers_i:[1 TO *], offers_count:[1 TO *]) > > Also, there is a heavy performance penalty for this condition? I am > planning to use this for all my queries. > > -- > Thanks, > -Utkarsh > -- Thanks, -Utkarsh