I tried to create a copyField in Apache Solr schema, with several fields being a source using Schema API this way (through bash script).
curl -X POST -H 'Content-type:application/json' --data-binary '{
"add-copy-field":{
"source":["title","description","director:","leading_actors"],
"dest":"default_search_field"}
}' http://localhost:8983/solr/bestFilms/schema
It produced following error:
"copyField source :'[title, director, leading_actors, description]' is not a glob and doesn't match any explicit field or dynamicField.
How to use multiple source fields for a copyField through Schema API?
Turns out you can have multiple fields specified in destination field, like in tutorial
but not in source field. So for source field I had to specify, in my .sh script, four different requests:
That worked as expected.
P.S. A bonus - schema API reference at https://solr.apache.org/guide/8_9/schema-api.html states that you can have multiple commands in single POST, which I didn't know at the time given, so I suggest that approach instead of having separate CURL request for every field.