No solr plugin for 12.4

I am trying to set up an external solr container as described here but I am running into some issues.

It tells me to download the solar configuration jar from here, but there is no jar for version 12.4. The latest jar in there is 12.2. Are they not being published anymore? should I use jar 12.2 with XWiki 12.4?

with 12.2, solr starts fine, and loads the core, but xwiki tries to hit it with an invalid url:

org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://solr-index/solr/search: Expected mime type application/octet-stream but got text/html. <html>
2020-08-06T14:37:47.508795752Z <head>
2020-08-06T14:37:47.508799752Z <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
2020-08-06T14:37:47.508803952Z <title>Error 404 Not Found</title>
2020-08-06T14:37:47.508808252Z </head>
2020-08-06T14:37:47.508812152Z <body><h2>HTTP ERROR 404</h2>
2020-08-06T14:37:47.508816352Z <p>Problem accessing /solr/search/select. Reason:
2020-08-06T14:37:47.508820252Z <pre> Not Found</pre></p>
2020-08-06T14:37:47.508824352Z </body>
2020-08-06T14:37:47.508828152Z </html>
2020-08-06T14:37:47.508831952Z
2020-08-06T14:37:47.508835852Z at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:629)
2020-08-06T14:37:47.508839852Z at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:265)
2020-08-06T14:37:47.508843853Z at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:248)
2020-08-06T14:37:47.508847753Z at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:211)
2020-08-06T14:37:47.508851653Z at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:1003)

it is trying to hit it at /solr/search/select, which does not exist. Is xwiki tested with remote solr?

hi @paulpach.

welcome to xwiki.

I think the collection name is missing in the URL.

It is: http://solr-index/solr/search
It should be http://solr-index/solr/COLLECTION/search

i am not an expert in solr, but a quick google for solr Expected mime type application/octet-stream but got text/html brings up this:

so is this a bug in xwiki or am I missing some configuration?

hey @vmassol,

the documentation says one should enter the root server to the external solr in the config - not the core.

#-# [Since 12.2]
#-# The URL of the Solr server (the root server and not the URL of a core).
#-# The default value assumes that the remote Solr server is started in a different process on the 
same machine, using the default port.
# solr.remote.baseURL=http://localhost:8983/solr 

But it seems the core is missing in the connection string.

Is this a bug with docker environment-string or am i missing something?

Sorry but I don’t know this component. Maybe @tmortagne can help?

As suggested by the URL in the error, 12.4 expect the remote core name to be “search” because that’s how it’s called in the embedded version. This changed after 12.4 because many installed instances already had installed a core under the name “xwiki” so now the logic is that the remote search core name is “xwiki” and all the other cores (XWiki use several cores now) are prefixed with “xwiki_” to avoid potential collisions with others cores in that Solr instance.

If you don’t want to upgrade now you can still use the old solr.remote.url property instead of solr.remote.baseURL where you explicitly indicate the URL to the solr core you want.

Thank you!