You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into an issue where variable substitution is not working properly when loading data config from an XML file. I have an entity element with attribute url="${solr.core.instanceDir}/workDir/claimcontact.xml". When running full-import, I get this error:
Should this be changed to new VariableResolver(dataImporter.getCore().getCoreDescriptor().getSubstitutableProperties());?
The text was updated successfully, but these errors were encountered:
szhou1998
changed the title
When loading configuration from Data Config file, variable substitution does not work for "solr.core.instanceDir"
When loading configuration from data config file, variable substitution does not work for "solr.core.instanceDir"
Jan 20, 2024
I'm running into an issue where variable substitution is not working properly when loading data config from an XML file. I have an entity element with attribute
url="${solr.core.instanceDir}/workDir/claimcontact.xml"
. When running full-import, I get this error:As you can see, the
solr.core.instanceDir
variable is not being substituted correctly. I believe the issue is with this bit of code in DocBuilder:https://github.com/SearchScale/dataimporthandler/blob/branch_9x/src/main/java/org/apache/solr/handler/dataimport/DocBuilder.java#L116-L120
In Solr 8, a change was made to get the properties from CoreDescriptor substitutableProperties: apache/lucene-solr@17ae79b#diff-9eadac54fe1ace540cb05b6711791be03a9289a7d6f16615fb4efa4ee31641f9
CoreDescriptor substitutableProperties has
solr.core.instanceDir
as a property: https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/core/CoreDescriptor.java#L269However, note that in the Solr 9 DocBuilder change in this repo, the Solr 8 "before" code did not have this change: ec730d5#diff-88595e01694c11981cecf4b71fdc54969870ff49737208856685388eb3bb0ee5
Should this be changed to
new VariableResolver(dataImporter.getCore().getCoreDescriptor().getSubstitutableProperties());
?The text was updated successfully, but these errors were encountered: