There is a distinction between the original source input value for the indexing process and what value is actually indexed. Query searching will see whatever is actually indexed, not the original source input value. An URP could explicitly set the source input value to the default value if it is missing, but you would have to specify an explicit value for the URP to use.

-- Jack Krupansky

-----Original Message----- From: Elran Dvir
Sent: Monday, July 28, 2014 4:12 AM
To: solr-user@lucene.apache.org
Subject: RE: copy EnumField to text field

Are you saying that default values are for query and not for indexing?

Thanks.

-----Original Message-----
From: Alexandre Rafalovitch [mailto:arafa...@gmail.com]
Sent: Monday, July 28, 2014 9:38 AM
To: solr-user
Subject: Re: copy EnumField to text field

On Mon, Jul 28, 2014 at 1:31 PM, Elran Dvir <elr...@checkpoint.com> wrote:
But when no value is sent with severity, and the default of 0 is used, the fix doesn't seem to work.

I guess the default in this case is figured out at the query time because there is no empty value as such. So that would be too late for copyField. If I am right, then you could probably use UpdateRequestProcessor and set the default value explicitly (DefaultValueUpdateProcessorFactory).

Regards,
  Alex.

Personal: http://www.outerthoughts.com/ and @arafalov Solr resources and newsletter: http://www.solr-start.com/ and @solrstart Solr popularizers community: https://www.linkedin.com/groups?gid=6713853

Email secured by Check Point

Reply via email to