lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Conditions in function query
Date Thu, 15 Jan 2015 01:45:59 GMT
Why won't the "if" clause work? See:
https://cwiki.apache.org/confluence/display/solr/Function+Queries

On Wed, Jan 14, 2015 at 5:29 PM, Shamik Bandopadhyay <shamikb@gmail.com> wrote:
> Hi,
>
>    Just wanted to know if it's possible to provide conditions with a
> function query. Right now,I'm using the following functions to boost on
> Likes data.
>
> bf=recip(ms(NOW/DAY,PublishDate),3.16e-11,1,1)^2.0 sum(Likes,2)
>
> What I would like to do is to apply the boost on "Likes" based on source.
> For e.g.
>
> if Source="A" or "B" or "C", then sum(Likes,4)
> if Source="D" then sum(Likes,3)
> if Source="E" the sum(Likes,2).
>
> Is it possible to do this using a function ?
>
> Any pointers will be appreciated.
>
> Regards,
> Shamik

Mime
View raw message