How to update solr.xml in embedded solr, or update solr config properties

Hello

I’m trying to upgrade solr.xml in the root folder of /solr

I’m using the solr embedded in XWiki

I wanted to upgrade the maxBooleanClauses for the “search” core from 1024 to “2048”

I modified it directly in solr/search/conf/solrconfig.xml

But when starting XWiki it said

2025-06-07 19:27:49,251 [coreLoadExecutor-13-thread-1] WARN  o.a.s.c.SolrConfig             - solrconfig.xml: <maxBooleanClauses> of 2048 is greater than global limit of 1024 and will have no effect set 'maxBooleanClauses' in solr.xml to increase global limit 

So, I tried instead to upgrade solr/solr.xml with

<solr>
  <int name="maxBooleanClauses">2048</int>
  <logging>
    <str name="enabled">false</str>
  </logging>
</solr>

But on XWiki start, the content of this files is automatically erased and replaces with

<solr><logging><str name="enabled">false</str></logging></solr>

I’m using XWiki 15.10.15

Thank you for any helps

Regards

The solr.xml file is indeed reset at every restart. It was simply the simplest to always make sure it’s up-to-date, given that it’s not really expected to be modified.

Thanks for answering.

So there is no way at all to modify the configuration of embedded solr in XWiki ?

Because in the this case we need to modify the maxBooleanClause.

But we will also need to modify several other thing to tune a bit more the solr indexation ( actually our embedded solr consume far more RAM that we want in production )

But if I focus to maxBooleanClause

In this file /data/xwiki/solr/search/conf/solrconfig.xml

There is the property

<maxBooleanClauses>${solr.max.booleanClauses:1024}</maxBooleanClauses>

I tried to put directly “2028” to not use this variable but it’s ignored because 1024 is enforced somewhere but I can’t know where.

We don’t have any way to tune embedded solr in XWiki ? The only way will be to externalize solr server ?

Thanks a lot in advance

For this at least, you should be able to simply add -Dsolr.max.booleanClauses=2048 to the Java command line that is used for starting XWiki.

Note that we’ve optimized Solr’s schema to significantly reduce memory usage for caches during queries. See XWIKI-22820 and XWIKI-23052. We also optimized the backlinks search to set proper limits in the Solr query, see XWIKI-23081.

I don’t know what kind of optimizations you wanted to apply, I just wanted to make sure you’re aware of those recent improvements.

Thanks a lot it’s really helpfull and nice to see that there is this fix available.

For now we are still using LTS 15.10.16

Indeed we encounter OOM issue because of Solr on our VMs and it started with upgrade to version 15.10. It would have be nice to have a patch on 15.10, but we will try to proceed the major upgrade ASAP.

Best regards

Axel