Remote solr on xwiki 9.6 not working

Hi,
I try to start using remote solr on xwiki 9.6.

I read the xwiki docs and searched on google to solve existing problems, but do not found solution.

I catalina logs (xwiki logs) I found many messages like:

[XWiki Solr index thread] ERROR o.x.s.s.i.DefaultSolrIndexer - Failed to process entry [INDEX Object_property xwiki:FlamingoThemes.Darkly^FlamingoThemesCode.ThemeClass[0].lessCode]
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/xwiki_core: Exception writing document id xwiki:FlamingoThemes.Darkly^FlamingoThemesCode.ThemeClass[0].lessCode to the index; possible analysis error: Document contains at least one immense term in field=“propertyvalue_en” (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. Please correct the analyzer to not produce such terms. The prefix of the first immense term is: ‘[47, 47, 32, 68, 97, 114, 107, 108, 121, 32, 51, 46, 51, 46, 53, 10, 47, 47, 32, 86, 97, 114, 105, 97, 98, 108, 101, 115, 10, 47]…’, original message: bytes can be at most 32766 in length; got 32813. Perhaps the document has an indexed string field (solr.StrField) which is too large
at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:610)
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:279)
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:268)
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149)
at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:173)
at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:138)
at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:152)
at org.xwiki.search.solr.internal.AbstractSolrInstance.add(AbstractSolrInstance.java:61)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:413)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:377)

Also like this:

[XWiki Solr index thread] ERROR o.x.s.s.i.DefaultSolrIndexer - Failed to process entry [INDEX xwiki:Dashboard.WebHome]
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/xwiki_core: ERROR: [doc=xwiki:Dashboard.WebHome_] Error adding field ‘property.XWiki.GadgetClass.position__’=‘[1, 1, 1, 2, 2, 2, 2,
1]’ msg=For input string: “1, 1”
at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:610)
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:279)
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:268)
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149)
at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:173)
at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:138)
at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:152)
at org.xwiki.search.solr.internal.AbstractSolrInstance.add(AbstractSolrInstance.java:61)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:413)
at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:377)
at java.lang.Thread.run(Thread.java:745)

In my solr server I can find messages like:

ERROR false RequestHandlerBase org.apache.solr.common.SolrException: Exception writing document id xwiki:FlamingoThemes.Darkly^FlamingoThemesCode.ThemeClass[0].lessCode to the index; possible analysis error: Document contains at least one immense term in field=“propertyvalue_en” (whose UTF8 encoding is longer than the max length 32766),​ all of which were skipped. Please correct the analyzer to not produce such terms. The prefix of the first immense term is: ‘[47,​ 47,​ 32,​ 68,​ 97,​ 114,​ 107,​ 108,​ 121,​ 32,​ 51,​ 46,​ 51,​ 46,​ 53,​ 10,​ 47,​ 47,​ 32,​ 86,​ 97,​ 114,​ 105,​ 97,​ 98,​ 108,​ 101,​ 115,​ 10,​ 47]…’,​ original message: bytes can be at most 32766 in length; got 32813. Perhaps the document has an indexed string field (solr.StrField) which is too large

My configuration:
xwiki.properties:

solr.type=remote
solr.remote.url=http://localhost:8983/solr/xwiki_core
solr.synchronizeAtStartup=true

On solr server I created core with name “xwiki_core” and downloaded solr schema from:

Pls. point me to any good docs about remote solr setup on xwiki.

I am using UTF8 encoding.

Many thanks in advance.
Peter.

You saw that the name of the repository where you got your schema contains “attic”, right ? :slight_smile:

http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr%20Search%20API#HSetuparemoteSolrserver is indicating a link to download a pre-configured Solr core for XWiki (with the right schema in it among other things).

Hi,

Thanks for the replay.

I read this part from the docs.

But I do not know with the jar-file I downloaded.

Do I need to copy in xwiki deployment ?
In which folder ?

Many thanks,
Peter.

JAR files are actually ZIP files. So if you unzip it you will get a preconfigured Solr core specific to XWiki, then you need to put this core with other Solr cores.