lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Utkarsh Sengar <utkarsh2...@gmail.com>
Subject Re: Check if dynamic columns exists and query else ignore
Date Fri, 18 Oct 2013 17:51:20 GMT
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 <utkarsh2012@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message