This question about Using an extension: Answered

SolrPlugin: solrindex indexes disappearing

Hi, folks! I have been a TWiki user since 2002 and a Foswiki user since just after the fork.

This product has literally saved my bacon countless times. I tell people it's my hidden superpower!

But after, what is it? 19 years, well, it's gotten a bit slow, so I'm looking for a way to speed things up.

Since there is no compiled version and nothing that seems to be able to just read the wiki folders, I'm hoping at least to speed up the search capability.

A very knowledgeable friend suggested I use Solr. Happily, there is a SolrPlugin for Foswiki. But things haven't gone well.

solr version : 5.5.5

OS : Slackware 14.2 32bit

Java version :
11:46 AM:root@tpad:.../htdocs/wiki/tools:130 # java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) Server VM (build 25.221-b11, mixed mode)
11:46 AM:root@tpad:.../htdocs/wiki/tools:0 # 

I followed the installation instruction here https://foswiki.org/Extensions/SolrPlugin#Installation

/etc/default/solr.in.sh contains (sans comments)

11:46 AM:root@tpad:.../htdocs
11:51 AM:root@tpad:.../htdocs/wiki/tools:0 # grep ^[^#] /etc/default/solr.in.sh
SOLR_HEAP="512m"
GC_LOG_OPTS="-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails  -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime"
GC_TUNE="-XX:NewRatio=3  -XX:SurvivorRatio=4  -XX:TargetSurvivorRatio=90  -XX:MaxTenuringThreshold=8  -XX:+UseConcMarkSweepGC  -XX:+UseParNewGC  -XX:ConcGCThreads=4 -XX:ParallelGCThreads=4  -XX:+CMSScavengeBeforeRemark  -XX:PretenureSizeThreshold=64m  -XX:+UseCMSInitiatingOccupancyOnly  -XX:CMSInitiatingOccupancyFraction=50  -XX:CMSMaxAbortablePrecleanTime=6000  -XX:+CMSParallelRemarkEnabled  -XX:+ParallelRefProcEnabled"
ENABLE_REMOTE_JMX_OPTS="false"
SOLR_OPTS="$SOLR_OPTS -Xss256k"
SOLR_OPTS="$SOLR_OPTS  -Djetty.host=localhost"
SOLR_PID_DIR="/var/solr"
SOLR_HOME="/var/solr/data"
LOG4J_PROPS="/var/solr/log4j.properties"
SOLR_LOGS_DIR="/var/solr/logs"
SOLR_PORT="8983"
11:51 AM:root@tpad:.../htdocs/wiki/tools:0 # 

Solr comes up fine and runs at http://localhost:8983/solr/#/~cores/foswiki

I run the command :-

09:17 AM:root@tpad:.../htdocs/wiki/tools:0 # ./solrindex mode=full optimize=on

I get output like
Click here for output details

08:49 AM:root@tpad:.../htdocs/wiki/tools:0 # ./solrindex mode=full optimize=on 
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 315, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 332, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 335, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 338, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 341, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 344, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string gt at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 349, <$IN_FILE> line 1.
Use of uninitialized value $fields[0] in pattern match (m//) at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 349, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 354, <$IN_FILE> line 1.
Use of uninitialized value $fields[0] in pattern match (m//) at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 354, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 360, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 374, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 375, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 376, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 377, <$IN_FILE> line 1.
BAXTER.WysiwygPluginTopicLister gone ... deleting
Indexing topic BAXTER.AnalogIoRampup
Indexing topic BAXTER.BaxterExamplesScripts
Indexing topic BAXTER.BaxterGetHeadCameraImage
Indexing attachment BAXTER.BaxterGetHeadCameraImage.output-from-Baxter-Get-Head-Camera-Image-command.png
Indexing attachment BAXTER.BaxterGetHeadCameraImage.xdisplay help.png
Indexing topic BAXTER.BaxterGripperControl
Indexing topic BAXTER.BaxterGrippperKeyboardControl
Indexing topic BAXTER.ChangingROSovaToBootXfce4
Indexing topic BAXTER.CommandToDisplayAnImageOnBaxterScreen
Indexing topic BAXTER.DigitalIoBlink
Indexing topic BAXTER.HeadWobbler
Indexing topic BAXTER.HowToRunPythonWebserver
Indexing topic BAXTER.LogForDecember2017
Indexing topic BAXTER.LogForMarch2018
Indexing topic BAXTER.LogForNovember2017
Indexing attachment BAXTER.LogForNovember2017.A_Gentle_Introduction_to_ROS.pdf
Indexing attachment BAXTER.LogForNovember2017.after-attempting-to-cancel-the-python-CGIHTTPServer-session.png
Indexing attachment BAXTER.LogForNovember2017.IMG_20171116_152149.jpg
Indexing attachment BAXTER.LogForNovember2017.IMG_20171116_154613.jpg
Indexing attachment BAXTER.LogForNovember2017.IMG_20171116_154538.jpg
Indexing attachment BAXTER.LogForNovember2017.IMG_20171116_155936.jpg
Indexing attachment BAXTER.LogForNovember2017.result-of-catkin-make-command-yubuntu-vm.png
Indexing attachment BAXTER.LogForNovember2017.glade-tutorial-files.tgz
Indexing attachment BAXTER.LogForNovember2017.joystick-game-controller-compatible-with-Baxter.png
Indexing attachment BAXTER.LogForNovember2017.test.py.txt
Indexing attachment BAXTER.LogForNovember2017.no-vacuum--hardware-inside-Baxter.png
Indexing attachment BAXTER.LogForNovember2017.pos.csv
Indexing attachment BAXTER.LogForNovember2017.move_right_limb.py.txt
Indexing attachment BAXTER.LogForNovember2017.where_left.py.txt
Indexing attachment BAXTER.LogForNovember2017.where_right.py.txt
Indexing attachment BAXTER.LogForNovember2017.question-about-vacuum-gripper.png
Indexing attachment BAXTER.LogForNovember2017.these-instructions-dont-work.png
Indexing attachment BAXTER.LogForNovember2017.associated-child-script-option-is-NOT-enabled.png
Indexing attachment BAXTER.LogForNovember2017.wot-a-difference-a-little-more-RAM-makes.png
Indexing topic BAXTER.LogForOctober2017
Indexing attachment BAXTER.LogForOctober2017.errors-when-trying-to-start-baxter.png
Indexing attachment BAXTER.LogForOctober2017.output-from-cdl-ros-ws-test-shx.png
Indexing topic BAXTER.RosBridgeServer
Indexing topic BAXTER.RunningScriptsFromWebpage
Indexing attachment BAXTER.RunningScriptsFromWebpage.second-py-output.png
Indexing topic BAXTER.ScriptFromNetAboutApacheRosrun
Indexing topic BAXTER.ScriptToControlBaxterCameras
Indexing topic BAXTER.ScriptsReferencingVacuum
Indexing topic BAXTER.SomeDefinitions
Indexing topic BAXTER.StartMoveIt
Indexing topic BAXTER.StatusPage
Indexing topic BAXTER.VirtualBoxOnBaxterLaptop
Indexing topic BAXTER.WebHome
Indexing attachment BAXTER.WebHome.Emergency stop button.jpg
Indexing attachment BAXTER.WebHome.jackie.conf
Indexing attachment BAXTER.WebHome.camera_test.py.txt
Indexing attachment BAXTER.WebHome.Notes on Baxter.docx
Indexing attachment BAXTER.WebHome.xdisplay help.png
...
This goes on for thousands of lines...
and ends with
Indexing topic Trash.WebHome
Indexing topic Trash.WebLeftBarExample
Optimizing index

Now, I would think that after indexing all that, I would have a nice fat index file somewhere, in /var/solr/data/cores/foswiki/data/index/, for example. But what I end up with, is :-
11:18 AM:root@tpad:.../htdocs/wiki/tools:0 # ls /var/solr/data/cores/foswiki/data/index/
total 61,440
-rw-r--r-- 1 solr solr   353 May 14 09:17 _4mb.fdt
-rw-r--r-- 1 solr solr    84 May 14 09:17 _4mb.fdx
-rw-r--r-- 1 solr solr 4,731 May 14 09:17 _4mb.fnm
-rw-r--r-- 1 solr solr    59 May 14 09:17 _4mb.nvd
-rw-r--r-- 1 solr solr   278 May 14 09:17 _4mb.nvm
-rw-r--r-- 1 solr solr   494 May 14 09:17 _4mb.si
-rw-r--r-- 1 solr solr   172 May 14 09:17 _4mb.tvd
-rw-r--r-- 1 solr solr    79 May 14 09:17 _4mb.tvx
-rw-r--r-- 1 solr solr   110 May 14 09:17 _4mb_Lucene50_0.doc
-rw-r--r-- 1 solr solr   200 May 14 09:17 _4mb_Lucene50_0.pos
-rw-r--r-- 1 solr solr 4,506 May 14 09:17 _4mb_Lucene50_0.tim
-rw-r--r-- 1 solr solr 1,227 May 14 09:17 _4mb_Lucene50_0.tip
-rw-r--r-- 1 solr solr   168 May 14 09:17 segments_65
-rw-r--r-- 1 solr solr     0 May 14 06:50 write.lock
11:18 AM:root@tpad:.../htdocs/wiki/tools:0 # 

And the Solr web UI running at http://localhost:8983/solr/#/~cores/foswiki, shows numDocs = 1

1 document.

Needless to say, my WebSearch page shows no result when I search on the word 'the', a fairly common word in my 19 year old wiki which has grown to 2.3GB over the years.

Now, if I run
11:26 AM:root@tpad:.../htdocs/wiki/tools:0 # ./solrindex topic=Main.WebHome
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 315, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 332, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 335, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 338, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 341, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 344, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string gt at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 349, <$IN_FILE> line 1.
Use of uninitialized value $fields[0] in pattern match (m//) at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 349, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 354, <$IN_FILE> line 1.
Use of uninitialized value $fields[0] in pattern match (m//) at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 354, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 360, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 374, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 375, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 376, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 377, <$IN_FILE> line 1.
Indexing topic Main.WebHome
Indexing attachment Main.WebHome.conspiracy-theories-debunked.png
WARNING: invalid version '1.1' of attachment conspiracy-theories-debunked.png in Main.WebHome
Indexing attachment Main.WebHome.Pomodoro_v1.0_apkpure.com.apk
WARNING: invalid version '1.1' of attachment Pomodoro_v1.0_apkpure.com.apk in Main.WebHome
Indexing attachment Main.WebHome.jackie.conf
Indexing attachment Main.WebHome.my-port-mapping-to-allow-access-to-my-CPMLTEST-odoo-instance.png
Indexing attachment Main.WebHome.Suggested-Receipt-screen.png
Indexing attachment Main.WebHome.this-is-my-external-IP-address.png
Indexing attachment Main.WebHome.webmin-login-screen-for-Odoo-VM.png
11:26 AM:root@tpad:.../htdocs/wiki/tools:0 # 

In the Solr web ui, I see numDocs change to 9 from 1, and I can then run my WebSearch page on the word "allow" and I get a hit and clicking on it works beautifully.

So, I even tried indexing the topic one-by-one using :-
11:37 AM:root@tpad:.../htdocs/wiki/tools:130 # for i in `find /var/www/htdocs/wiki/data/Main/ -type f -name '*.txt' -print0|sed 's!/var/www/htdocs/wiki/data/! \n!g'|sed 's!\.txt!!g'|sed 's!/!.!g'`
>do 
>   ./solrindex topic=$i --mode="delta"
>done

However, this does not work. The numDocs value does not increase linearly as I expected. Instead, it increases and then decreases, with no rhyme or reason.

Can someone point me to a link that might help, please?

Thanks in advance.

-- StanBrown - 14 May 2021

It doesn't seem as if you fully followed the recommended installation steps. Did you install the schema configuration that comes with SolrPlugin? Also, this should be
$Foswiki::cfg{SolrPlugin}{Url} = 'http://localhost:8983/solr/foswiki';

not http://localhost:8983/solr/#/~cores/foswiki

There seems to be format error in your data/.htpasswd file. Which Foswiki version did you install? Did you migrate data from a different engine?

Indexing topics "one by one" doesn't help. Using mode=delta will index all topics that haven't been indexed since your last call, whereas topic=... indexes just that specific topic.

So first make sure you can index one topic without errors by using:
cd <foswiki-dir>/tools; ./solrindex topic=Main.WebHome

-- MichaelDaum - 14 May 2021

I'm assuming that this
$Foswiki::cfg{SolrPlugin}{Url} = 'http://localhost:8983/solr/foswiki';

maps to this in the http://localhost/wiki/bin/configure webpage

  • This is what the URL is currently set to:
SolrPlugin-Url-14-May-2021-1506.png

Now, if I browse to that URL, http://localhost:8983/solr/foswiki, this is the result, a 404 error

  • This is what I get when I browse to the SolrPlugin URL:
what-I-get-when-I-browse-to-the-SolrPlugin-url-14-May-2021-1531.png

However, in the Solr web UI, there is a page at http://localhost:8983/solr/#/foswiki

  • what-the-Solr-web-ui-shows-14-May-2021-1532.png:
what-the-Solr-web-ui-shows-14-May-2021-1532.png

If the URL was wrong, would not the index process fail immediately instead of continuing to index topics?

I'm confused.

I installed the SolrPlugin directly from the http://localhost/wiki/bin/configure webpage, and the install log showed no errors.

03:29 PM:root@tpad:~:0 # less /var/www/htdocs/wiki/working/logs/configure/SolrPlugin-20210514-192523-Install.log
> Loading package installer
   * fetching SolrPlugin installer from https://foswiki.org/pub/Extensions/...
> *WARNING:* 
---++ Dependency Report for SolrPlugin ...
> *INSTALLED*
   * Foswiki::Contrib::JQMomentContrib version 18 Nov 2019 installed 
   * Foswiki::Contrib::JQPhotoSwipeContrib version 18 Nov 2019 installed 
   * Foswiki::Contrib::JQSerialPagerContrib version 26 Oct 2020 installed 
   * Foswiki::Contrib::JQTwistyContrib version 26 Oct 2020 installed 
   * Foswiki::Contrib::StringifierContrib version 16 Aug 2018 installed 
   * Foswiki::Plugins::AutoTemplatePlugin version 12 Nov 2019 installed 
   * Foswiki::Plugins::DBCachePlugin version 15 Oct 2020 installed 
   * Foswiki::Plugins::FilterPlugin version 19 Oct 2020 installed 
   * Foswiki::Plugins::FlexWebListPlugin version 27 Oct 2020 installed 
   * Foswiki::Plugins::ImagePlugin version 26 Oct 2020 installed 
   * Foswiki::Plugins::JQueryPlugin version 18 Nov 2019 installed 
   * Cache::Cache version 1.08 installed 
   * HTML::Entities version 3.75 installed 
   * JSON::XS version 4.03 installed 
   * LWP::UserAgent version 6.39 installed 
   * Moo version 2.004000 installed 
   * Types::Standard version 1.012003 installed 
   * XML::Easy version 0.011 installed 
   * Foswiki::Plugins::TopicTitlePlugin version 28 Oct 2020 installed 
> *WARNING:*  *MISSING*
   * Foswiki::Plugins::ClassificationPlugin version >=1.0 required -- perl module is not installed  - Optional - Optional dependency, will not be automatically installed
---+++ Creating backup of SolrPlugin ...
   * Nothing to backup
> Running pre-install for SolrPlugin ...
---+++ Installing SolrPlugin
   * fetching SolrPlugin from https://foswiki.org/pub/Extensions/ ...
> Unpacking /tmp/Of1gmro9CV.tgz..., Size: 1365824 Modified: Fri May 14 15:25:30 2021
> Saving /tmp/Of1gmro9CV.tgz to /var/www/htdocs/wiki/working/configure/download/SolrPlugin.tgz
> Installed: 180 files copied; 0 filed checked in, 0 files attached
> Installed:  SolrPlugin_installer to /var/www/htdocs/wiki/working/configure/pkgdata
> Running post-install for SolrPlugin...
> Before proceeding, review the dependency reports of each installed extension
  and resolve any dependencies, as required.
   * External non-perl dependencies are never automatically resolved by Foswiki.
   * Dependencies noted as 'Optional' will not be automatically resolved, and
   * CPAN dependencies are never automatically resolved.

> After your configuration has been saved:
   * Visit SolrPlugin extension page
   * Check InstalledPlugins to check for errors.

> The following configuration changes are needed to enable plugins.
These will be automatically applied when the configuration is saved.

> _Changed:_ {Plugins}{SolrPlugin}{Enabled} = 1
> _Changed:_ {Plugins}{SolrPlugin}{Module} = 'Foswiki::Plugins::SolrPlugin'

> *WARNING:* 
> Installation finished
(END)

There are no errors in http://192.168.10.2/wiki/bin/view/System/InstalledPlugins either.

I ran the ./solrindex command you suggested again and got the following :-

03:47 PM:root@tpad:.../htdocs/wiki/tools:0 # ./solrindex topic=Main.WebHome
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 315, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 332, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 335, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 338, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 341, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 344, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string gt at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 349, <$IN_FILE> line 1.
Use of uninitialized value $fields[0] in pattern match (m//) at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 349, <$IN_FILE> line 1.
Use of uninitialized value $tPass in string eq at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 354, <$IN_FILE> line 1.
Use of uninitialized value $fields[0] in pattern match (m//) at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 354, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 360, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 374, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 375, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 376, <$IN_FILE> line 1.
Use of uninitialized value $hID in hash element at /var/www/htdocs/wiki/lib/Foswiki/Users/HtPasswdUser.pm line 377, <$IN_FILE> line 1.
Indexing topic Main.WebHome
Indexing attachment Main.WebHome.conspiracy-theories-debunked.png
WARNING: invalid version '1.1' of attachment conspiracy-theories-debunked.png in Main.WebHome
Indexing attachment Main.WebHome.Pomodoro_v1.0_apkpure.com.apk
WARNING: invalid version '1.1' of attachment Pomodoro_v1.0_apkpure.com.apk in Main.WebHome
Indexing attachment Main.WebHome.jackie.conf
Indexing attachment Main.WebHome.my-port-mapping-to-allow-access-to-my-CPMLTEST-odoo-instance.png
Indexing attachment Main.WebHome.Suggested-Receipt-screen.png
Indexing attachment Main.WebHome.this-is-my-external-IP-address.png
Indexing attachment Main.WebHome.webmin-login-screen-for-Odoo-VM.png
03:47 PM:root@tpad:.../htdocs/wiki/tools:0 # 

-- StanBrown - 14 May 2021

The Solr web ui now shows the additional documents in the numDocs value, suggesting they have been added to the index.

  • after-running-solrindex-Main.WebHome-14-May-2021-1551.png:
after-running-solrindex-Main.WebHome-14-May-2021-1551.png

I can even search successfully on the word 'weather', and clicking on the resulting link also takes me to the right topic.

  • SolrSearch -query-result-after-solrindex-Main.WebHome-14-May-2021-1600.png:
SolrSearch-query-result-after-solrindex-Main.WebHome-14-May-2021-1600.png

If the url was incorrect, then this search result logically should not occur.

To me, it suggests that, at this point in time, the url must be correct and a valid index up to this point, must exist.

Or, am I missing something?

Fri May 14 16:55:37 AST 2021

MichaelDaum, it's working now. I don't know exactly what I did, but I'm going to assume that re-installing the SolrPlugin did the trick.

The Solr web ui is showing numDocs close to 10,000 now and rising.

Thanks for all your help.

Sun May 16 10:53:42 AST 2021

MichaelDaum, a thought about the SolrPlugin wikipage.

One of the things about that page, is the location of the file solr.in.sh configuration file.

In the instructions on the webpage, it is in /var/solr/solr.in.sh, but the installation script install_solr_service.sh places it in /etc/default/solr.in.sh instead.

  • location-of-solr-configuration-file-16-May-2021-1101.png:
location-of-solr-configuration-file-16-May-2021-1101.png
# install/move configuration
if [ ! -d /etc/default ]; then
  mkdir /etc/default
  chown root: /etc/default
  chmod 0755 /etc/default
fi
if [ -f "$SOLR_VAR_DIR/solr.in.sh" ]; then
  echo -e "\nMoving existing $SOLR_VAR_DIR/solr.in.sh to /etc/default/$SOLR_SERVICE.in.sh ...\n"
  mv "$SOLR_VAR_DIR/solr.in.sh" "/etc/default/$SOLR_SERVICE.in.sh"
elif [ -f "/etc/default/$SOLR_SERVICE.in.sh" ]; then
  echo -e "\n/etc/default/$SOLR_SERVICE.in.sh already exist. Skipping install ...\n"
else
  echo -e "\nInstalling /etc/default/$SOLR_SERVICE.in.sh ...\n"
  cp "$SOLR_INSTALL_DIR/bin/solr.in.sh" "/etc/default/$SOLR_SERVICE.in.sh"
  mv "$SOLR_INSTALL_DIR/bin/solr.in.sh" "$SOLR_INSTALL_DIR/bin/solr.in.sh.orig"  
  mv "$SOLR_INSTALL_DIR/bin/solr.in.cmd" "$SOLR_INSTALL_DIR/bin/solr.in.cmd.orig"  
  echo "SOLR_PID_DIR=\"$SOLR_VAR_DIR\"
SOLR_HOME=\"$SOLR_VAR_DIR/data\"
LOG4J_PROPS=\"$SOLR_VAR_DIR/log4j2.xml\"
SOLR_LOGS_DIR=\"$SOLR_VAR_DIR/logs\"
SOLR_PORT=\"$SOLR_PORT\"
" >> "/etc/default/$SOLR_SERVICE.in.sh"
fi
chown root:${SOLR_USER} "/etc/default/$SOLR_SERVICE.in.sh"
chmod 0640 "/etc/default/$SOLR_SERVICE.in.sh"

 

QuestionForm edit

Subject Using an extension
Extension SolrPlugin
Version Foswiki 2.1.4
Status Answered
Related Topics
Topic revision: r4 - 16 May 2021, StanBrown
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy