You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Steve Pruitt <bp...@opentext.com> on 2017/08/02 17:58:50 UTC

default values in multiValue field

Are default values supported for fields defined as multivalued text?  I can't get it to work.
Scouring the documentation, I found nothing indicating the two attributes are mutually exclusive.
I found a couple of online examples indicating the two attributes can be used together.  

I have this field type defined in my schema.

<field name="survey_answer" type="text_ws" indexed="true" stored="true" required="false" multiValued="true" default="no response provided"/>

and this input

<doc>
:
<field name="survey_answer"/>
:
</doc>

The default value is not set.

I changed the schema to a string type, but it still doesn't work.

<field name="survey_answer" type="string" indexed="true" stored="true" required="false" multiValued="true" default="no response provided"/>


Thanks.

-Steve