lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Mandel <mark.man...@gmail.com>
Subject Re: Using a sum of fields in a filter query
Date Wed, 05 Sep 2012 01:06:29 GMT
Thanks!

The piece I was also missing as well was to add:
<queryParser name="functionparser"
class="org.apache.solr.search.FunctionQParserPlugin"/>

To my solrconfig.xml.

Once I did that, it all worked perfectly!

Much appreciated!

Mark



On Tue, Sep 4, 2012 at 5:25 PM, Rafał Kuć <r.kuc@solr.pl> wrote:

> Hello!
>
> Try something like
>
> fq={!frange l=0 u=100}sum(fielda, fieldb, fieldc)
>
> --
> Regards,
>  Rafał Kuć
>  Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch
>
> > Hey all,
>
> > I have a series of fields with numeric values in my solr index.
>
> > What I want to be able to do is the equivalent of something like below in
> > my filter query (fq) parameter:
>
> > sum(fielda, fieldb, fieldc):[0 to 100]
>
> > So the sum of the fields is between 0 and 100.
>
> > Is there some way to do this in SOLR on a FQ?  I've hunted high and low
> and
> > haven't been able to see the correct syntax for it.
>
> > If someone could point me in the right direction, I would greatly
> > appreciated it.
>
> > Thanks!
>
> > Mark
>
>


-- 
E: mark.mandel@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast
http://www.2ddu.com/

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