Stream: containers

Topic: adding a Solr field to schema.xml


view this post on Zulip Philip Durbin ๐Ÿš€ (Aug 05 2024 at 19:07):

I'm pretty confused. In #10694 I added the field <field name="datasetType" type="string" stored="true" indexed="true" multiValued="false"/> and it's been working fine.

I'm back on that branch testing again and that field I added (datasetType) to the schema.xml is not appearing in Solr. When I look at http://localhost:8983/solr/collection1/schema/fields the field isn't present.

I'm tried deleting all the images and rebuilding. What am I missing? :thinking:

view this post on Zulip Philip Durbin ๐Ÿš€ (Aug 05 2024 at 19:08):

I'm also doing rm -rf docker-dev-volumes, of course.

view this post on Zulip Philip Durbin ๐Ÿš€ (Aug 05 2024 at 19:08):

I've even played around with deleting fields from schema.xml but they're still appearing in the output of that "fields" API endpoint.

view this post on Zulip Philip Durbin ๐Ÿš€ (Aug 05 2024 at 19:15):

datasetType isn't appearing in docker-dev-volumes/solr/conf/conf/schema.xml :thinking:

view this post on Zulip Philip Durbin ๐Ÿš€ (Aug 05 2024 at 19:22):

Huh, mvn -Pct docker:build -Ddocker.filter=dev_bootstrap may have helped. But the docs at https://guides.dataverse.org/en/6.3/container/configbaker-image.html#build-instructions seem to suggest that `mvn -Pct package should be enough. :thinking:

view this post on Zulip Philip Durbin ๐Ÿš€ (Aug 05 2024 at 19:31):

I think what I was doing last week when working on this feature was this:

mvn -Pct clean package docker:run -Dapp.skipDeploy

But then I got clever and shortened it down to this:

mvn -Pct docker:run -Dapp.skipDeploy

The shorter version seems to work for many things (and is faster) but I guess I need that "package" in there when adding a new Solr field.


Last updated: Oct 30 2025 at 05:14 UTC