lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: Default value from another field?
Date Tue, 03 Oct 2017 16:14:20 GMT
Hi Emir,

Thanks for the tip about DefaultValueUpdateProcessorFactory. But even though I agree that
it most likely isn't too hard to write custom code that does this, the overhead is a bit too
much I think considering we now use a vanilla Solr with no custom code deployed. So we would
need to setup a new project, and a new deployment procedure, and that is a bit overkill considering
that this is a feature that would help me as a developer and administrator only a little bit
(ie nice-to-have), and at the same time would not have any impact for any end user (except,
possibly negative side effects because of bugs etc).


-----Original Message-----
From: Emir Arnautović [] 
Sent: Tuesday, October 3, 2017 3:28 PM
Subject: Re: Default value from another field?

Hi Jimi,
I don’t think that you can do it using schema, but you could do it using custom update request
processor chain. I quickly scanned to see if there is such processor and could not find one.
The closest one is
It should not be too hard to adjust it to do what you need.


Monitoring - Log Management - Alerting - Anomaly Detection Solr & Elasticsearch Consulting
Support Training -

> On 3 Oct 2017, at 14:10, wrote:
> Hi,
> Is it possible using some Solr schema magic to make solr get the default value for a
field from another field? Ie, if the value is specified in the document to be indexed, then
that value is used. Otherwise it uses the value of another field. As far as I understand it,
the field property "default" only takes a static value, not a reference to another field.
And the copyField element doesn't solve this problem either, since it will result in two values
if the field was specified in the document, and I only want a single value.
> /Jimi

View raw message