On Thu, Nov 3, 2011 at 12:59 PM, Milan Dobrota <mi...@milandobrota.com> wrote:
> Is there any way to define the default value for the dynamic fields in
> SOLR? I use some dynamic fields of type float with _val_ and if they
> haven't been created at index time, the value defaults to 0. I would want
> this to be 1. Can that be changed?


On trunk, there are some new (currently undocumented) function queries
that can do this:
def(myfield,1)

If there are not normally 0 values anyway, you can also map any 0
values encountered via map(),
or min() if existing values are all positive.

-Yonik
http://www.lucidimagination.com

Reply via email to