Hi all,

I am currently struggling with property substitution in the solrconfig.xml.
I am using version 8.11.0

My solrconfig.xml looks something like

    <requestHandler name="/select" class="solr.SearchHandler">
        <lst name="defaults">
            <str name="defType">edismax</str>
            <str name="qf">
                name^${name.weight}
                ...
            </str>


I have some default values defined in the core.properties file, which
looks like

...
name.weight=1.0
...


I want to override some of those defaults and i am using the Config API
as recommended here
https://solr.apache.org/guide/8_11/configuring-solrconfig-xml.html#config-api-to-override-solrconfig-xml

After that, my configoverlay.json looks like
{
"userProps": {
"name.weight": "10.0",
...
}
}


After setting all up like this and querying documents on the name field,
the scores of the documents are wrong because the weight from the
core.properties is used
instead of the weight from the configoverlay.json.

For some reason the property substitution is not working as i am
expecting it.
Isn't it like, configoverlay.json has a higher priority than the
properties from core.properties?
So that the values of configoverlay.json should be used for property
substitution in the solrconfig.xml?

Thanks,
Stefan

Reply via email to