I think using multiple copyFields with target being your field somehow would 
work, although I should do some testing to find the exact configuration.

Because whenever I use a copyField with target being a non-multivalued field 
and target already has a value, I get an exception saying “you are trying to 
put multiple values into a non-multivalued field”. The opposite should work too 
:D



> On 21 Mar 2023, at 18:22, Mikhail Khludnev <m...@apache.org> wrote:
> 
> Hello,
> It seems like it's quite feasibly, but not actuall possible
> https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/update/DocumentBuilder.java#L280
> right now.
> 
>> On Mon, Mar 20, 2023 at 11:39 PM gnandre <arnoldbron...@gmail.com> wrote:
>> 
>> This seems very trivial but it is not working for me and I am not able to
>> figure out why.
>> 
>> If I have multivalued field like below,
>> 
>> <field name="domain" type="string" stored="true" indexed="true"
>> multiValued="true" default="en,jp"/>
>> 
>> When I index a document, instead of creating an array of strings, it
>> creates just a string like "en,jp"?
>> How can I define the default values such that they show up as ["en","jp"]
>> instead?
>> 
> 
> 
> -- 
> Sincerely yours
> Mikhail Khludnev
> https://t.me/MUST_SEARCH
> A caveat: Cyrillic!

Reply via email to