Search SOLR dont work xwiki 11.2 debian 9.8

Hello

Sorry for my bad english, I’m french.
I installed xwiki 11.2 on a debian 9.8
(apt-get install -y xwiki-tomcat8-mysql and choise “Xwiki Standard flavor”)
Everything works perfectly except search.

With Database, everything works fine
http://IP_Server:8080/xwiki/bin/view/Main/DatabaseSearch?

With Solr : it does not work, My pages are not indexing
http://IP_Server:8080/xwiki/bin/view/Main/SolrSearch?
I have answers for some words that are not in my pages.
For example, if I search with the word “zip” solr finds this word in
“Large export on disk by space” Located in “XWiki Advanced Administration Tools”
“SolrSearchConfig” Located in “Home”
“Document Tree Macros” Located in “XWiki”

I tried the following operations

  • Reindex the farm

  • delete the folder /var/lib/xwiki/data/solr

  • give everyone rights on my pages

  • edit and save my pages

  • modify the file /etc/xwiki/xwiki.properties :

    Environment

    environment.permanentDirectory=/var/lib/xwiki/data

    extension.oldflavors=org.xwiki.enterprise:xwiki-enterprise-ui-mainwiki
    extension.oldflavors=org.xwiki.enterprise:xwiki-enterprise-ui-wiki
    extension.oldflavors=org.xwiki.manager:xwiki-manager-ui
    extension.oldflavors=org.xwiki.manager:xwiki-manager-wiki-administrator
    extension.oldflavors=org.xwiki.manager:xwiki-enterprise-manager-wiki-administrator
    extension.oldflavors=com.xpn.xwiki.products:xwiki-enterprise-manager-wiki-administrator
    extension.oldflavors=com.xpn.xwiki.products:xwiki-enterprise-wiki

    Solr Search

    solr.type=embedded
    solr.embedded.home=/var/lib/xwiki/data/solr
    solr.indexer.batch.size=50
    solr.indexer.batch.maxLength=10000
    solr.synchronizeAtStartup=true

  • There is no error in /var/log/tomcat8/catalina.2019-03-25.log

Can you help me solve my problem?
Bests Regards

When you do the following:

  • delete the folder /var/lib/xwiki/data/solr
  • restart

Which numbers do you have in the log

INFO o.x.s.s.i.j.IndexerJob - x documents added, z deleted and 0 updated during the synchronization of the Solr index

x should be something like 860+.

Then take a look at http://127.0.0.1:8080/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Search to see the size of the indexing queue, always takes a little while when the index is totally empty.

Once the admin is telling you that the queue is empty, enable hidden documents in your user profile and search for *:*. How many results do you have ?

Hello
Thanks for your help

After delete /var/lib/xwiki/data/solr

In /var/log/tomcat8/catalina.out :
[org.xwiki.search.solr.internal.job.IndexerJob@18cdc559([solr, indexer])] INFO o.x.s.s.i.j.IndexerJob - 960 documents added, 0 deleted and 0 updated during the synchronization of the Solr index.

In http://IP_Server:8080/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Search
I see 7200

The result of search . is 491

  • I saw that one of my pages was indexed but only one

  • I have answers for some words that are not in my pages.
    For example, if I search with the word “zip” solr finds this word in
    “Large export on disk by space” Located in “XWiki Advanced Administration Tools”
    “SolrSearchConfig” Located in “Home”
    “Document Tree Macros” Located in “XWiki”

  • I have no error in log but this AVERTISSEMENT in dans /var/log/tomcat8/catalina.out
    AVERTISSEMENT [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false]
    …/…
    INFOS [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Déploiement du descripteur de configuration /etc/tomcat8/Catalina/localhost/xwiki.xml
    AVERTISSEMENT [localhost-startStop-1] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/lib/xwiki-platform-query-manager-11.1.xed] to the cache for web application [/xwiki] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

    I increase cacheMaxSize in /usr/lib/xwiki/META-INF/context.xml



    but i have always the Avertissement

Best Regards
Alain Bibaud

So looks like SOLR search is working as expected. As I said you should wait for the indexing process to be fully done before expecting to find all the pages.

I have answers for some words that are not in my pages.
For example, if I search with the word “zip” solr finds this word in
“Large export on disk by space” Located in “XWiki Advanced Administration Tools”
“SolrSearchConfig” Located in “Home”
“Document Tree Macros” Located in “XWiki”

Maybe you don’t see those words in view mode but it does not means they don’t exist in the content.

AVERTISSEMENT [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false]

Not really sure why Tomcat is producing this warning for but I don’t think this have any impact on XWiki.

AVERTISSEMENT [localhost-startStop-1] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/lib/xwiki-platform-query-manager-11.1.xed] to the cache for web application [/xwiki] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

This one was supposed to be fixed in 11.2, not sure why you have it but it does not have anything to do with the search.

Hello
Unfortunately, indexing still does not work properly
Here are my tests
(I specify that I reinstall several times xwiki on several debian with the same result)

I have 5 pages
xwiki/bin/view/DTO/
xwiki/bin/view/DTO/7-Zip%20v9.20/ with the word “occurrence”
xwiki/bin/view/DTO/Acces_intranet%20-%20Exploitation/ with the word “saga”
xwiki/bin/view/DTO/ArcGIS%2010.3%20-%20Installation/ with the word “ArcEditor”
xwiki/bin/view/DTO/MAC%20-%20Installation%20V4/ with “Gatekeeper”

this search work in the tittle
search with “7-ZIP” : result “7-Zip v9.20”
search with “exploitation” : result “Acces intranet - Exploitation”
search with “arcgis” : result “ArcGIS 10.3 - Installation”
search with “MAC” : result “MAC - Installation V4”

in the content

search with “occurrence” : no result
search with “saga” : no result
search with “ArcEditor” : no result
search with “gatekeeper” : result “MAC - Installation V4"MAC”

if i create the new page
xwiki/bin/view/DTO/test%20ab1/ with only the word “cheval”
search with “ab1” : result “test ab1”
search with “cheval” : no result

if i create the new page
xwiki/bin/view/DTO/MAC%20-%20Installation%20V4/test%20ab2/ with only the word “piano”
search with “ab2” : result “test ab2”
search with “piano” : no result

the search with database is always good
http://193.51.114.197:8080/xwiki/bin/view/Main/DatabaseSearch?

I am in xwiki 11.2 but I had the same results with xwiki 11.1

Best Regards
Alain Bibaud

Hello
It’s very surprising: solr can index only one page
MAC% 20-% 20Installation% 20V4
if I copy it by renaming it and replacing its content, the indexing is done well.
This page was created during my tests and import with a .xar
I do not see anything special about these properties
Bests regards
Alain Bibaud