Correct - copy field copies the raw, original, source input value, before
the actual field type has had a chance to process it in any way.
-- Jack Krupansky
-----Original Message-----
From: Elran Dvir
Sent: Monday, July 28, 2014 8:08 AM
To: solr-user@lucene.apache.org
Subject: RE: copy EnumField to text field
So if I have a document without severity, I can't see severity has its
default value (0) in the stage of copy fields (in class DocumentBuilder)?
Thanks.
-----Original Message-----
From: Jack Krupansky [mailto:j...@basetechnology.com]
Sent: Monday, July 28, 2014 2:39 PM
To: solr-user@lucene.apache.org
Subject: Re: copy EnumField to text field
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
Email secured by Check Point