Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Solr schema.xml configuration more flexible, still using Classic Schema Factory #6142

Closed
poikilotherm opened this issue Sep 5, 2019 · 0 comments · Fixed by #6146
Closed
Milestone

Comments

@poikilotherm
Copy link
Contributor

poikilotherm commented Sep 5, 2019

This issue is related to #5989.

Context and differentiation
#5989 is about changing the entire way of how schemas are handled and requires a lot of changes in Dataverse code, too. This is good and should be done.

This issue is about having a small workaround for easier deployment of custom metadata fields into the Solr schema, but still using the classic schema factory (in contrast to managed schema used by @pkiraly).

Idea
While getting gdcc/dataverse-kubernetes#85 ready for us (see also #6000), I thought about how to handle this. My basic idea:

  1. Remove this and this from schema.xml
  2. Create a file schema_dv_cmb_copies.xml and place all <copyField> from above in there.
  3. Create a file schema_dv_cmb_fields.xml and place all <field> from above in there.
  4. Include these in schema.xml:
<xi:include href="schema_dv_cmb_copies.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="schema_dv_cmb_fields.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

(see also https://stackoverflow.com/questions/16968986)

This can be bundled in upstream and is transparent/usable for all type of installations, as long as the relevant files are moved around. Existing installations can continue to use their custom schemas. This approach is way easier than a template with necessary extra steps.

On changing the blocks or adding its own:

  1. the API generated fields can be replaced by a script, fetching from <dvhost>/api/admin/index/solr/schema
  2. Replace the above files content
  3. Execute a RELOAD (see https://stackoverflow.com/questions/23782123)
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 6, 2019
Moving all <field> and <copyField> for custom metadata block indexing into separate files
for easier deployment and maintainability. See IQSS#6142 for more.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 6, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 6, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 6, 2019
Retrieve schema fields for custom metadata blocks from Dataverse API,
mangle to create schema XML files, deploy and reload Solr.
See IQSS#6142 for more.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 6, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 9, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 9, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 9, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 9, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 9, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 10, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 10, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 10, 2019
pdurbin added a commit to poikilotherm/dataverse that referenced this issue Sep 10, 2019
pdurbin added a commit to poikilotherm/dataverse that referenced this issue Sep 10, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 11, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 11, 2019
pdurbin added a commit to poikilotherm/dataverse that referenced this issue Sep 11, 2019
pdurbin added a commit to poikilotherm/dataverse that referenced this issue Sep 11, 2019
pdurbin added a commit to poikilotherm/dataverse that referenced this issue Sep 11, 2019
pdurbin added a commit to poikilotherm/dataverse that referenced this issue Sep 11, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 11, 2019
@pdurbin pdurbin added this to the 4.17 milestone Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants