Installing Solr Search - not indexing

422 views
Skip to first unread message

Anurag Spatzenegger

unread,
May 29, 2014, 11:36:09 AM5/29/14
to omek...@googlegroups.com
Hello,

I am trying to install Solr search. I downloaded the plugin from Github and successfully installed it. I copied the Omeka Core to Solr - I am using the multicore example install.  According to the Solr Admin, the core is appears to be loaded correctly.

I then updated the settings for Solr in the Admin Panel, setting it to the correct host (localhost) and port - the feedback is that the connection is valid. However, when I try to re-index the pages, nothing happens, no index is being created. When I check the Omeka Solr core, I can see that a tlog file gets created every time I try to reindex, but no data gets written to the index folder itself. I first thought that it might be problem with write permissions, but even when I set the permissions to 777 on the index folder and its content, still nothing appears to be getting indexed.

Here is an excerpt of the Solr Log file when I try to index the page:

INFO  - 2014-05-29 11:24:24.873; org.apache.solr.update.DirectUpdateHandler2; No uncommitted changes. Skipping IW.commit.
INFO  - 2014-05-29 11:24:24.873; org.apache.solr.core.SolrCore; SolrIndexSearcher has not changed - not re-opening: org.apache.solr.search.SolrIndexSearcher
INFO  - 2014-05-29 11:24:24.873; org.apache.solr.update.DirectUpdateHandler2; end_commit_flush
INFO  - 2014-05-29 11:24:24.874; org.apache.solr.update.processor.LogUpdateProcessor; [omeka] webapp=/solr path=/update params={wt=json} {commit=} 0 2
INFO  - 2014-05-29 11:24:24.875; org.apache.solr.update.DirectUpdateHandler2; start commit{,optimize=true,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=false,prepareCommit=false}
INFO  - 2014-05-29 11:24:24.875; org.apache.solr.update.DirectUpdateHandler2; No uncommitted changes. Skipping IW.commit.
INFO  - 2014-05-29 11:24:24.876; org.apache.solr.core.SolrCore; SolrIndexSearcher has not changed - not re-opening: org.apache.solr.search.SolrIndexSearcher
INFO  - 2014-05-29 11:24:24.876; org.apache.solr.update.DirectUpdateHandler2; end_commit_flush
INFO  - 2014-05-29 11:24:24.876; org.apache.solr.update.processor.LogUpdateProcessor; [omeka] webapp=/solr path=/update params={wt=json} {optimize=} 0 1
INFO  - 2014-05-29 11:24:24.891; org.apache.solr.update.processor.LogUpdateProcessor; [omeka] webapp=/solr path=/update params={wt=json} {} 0 0
INFO  - 2014-05-29 11:24:24.893; org.apache.solr.update.DirectUpdateHandler2; start commit{,optimize=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=false,prepareCommit=false}
INFO  - 2014-05-29 11:24:24.893; org.apache.solr.update.DirectUpdateHandler2; No uncommitted changes. Skipping IW.commit.
INFO  - 2014-05-29 11:24:24.893; org.apache.solr.core.SolrCore; SolrIndexSearcher has not changed - not re-opening: org.apache.solr.search.SolrIndexSearcher
INFO  - 2014-05-29 11:24:24.894; org.apache.solr.update.DirectUpdateHandler2; end_commit_flush
INFO  - 2014-05-29 11:24:24.894; org.apache.solr.update.processor.LogUpdateProcessor; [omeka] webapp=/solr path=/update params={wt=json} {commit=} 0 1
INFO  - 2014-05-29 11:24:24.895; org.apache.solr.update.DirectUpdateHandler2; start commit{,optimize=true,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=false,prepareCommit=false}
INFO  - 2014-05-29 11:24:24.895; org.apache.solr.update.DirectUpdateHandler2; No uncommitted changes. Skipping IW.commit.
INFO  - 2014-05-29 11:24:24.896; org.apache.solr.core.SolrCore; SolrIndexSearcher has not changed - not re-opening: org.apache.solr.search.SolrIndexSearcher
INFO  - 2014-05-29 11:24:24.896; org.apache.solr.update.DirectUpdateHandler2; end_commit_flush
INFO  - 2014-05-29 11:24:24.896; org.apache.solr.update.processor.LogUpdateProcessor; [omeka] webapp=/solr path=/update params={wt=json} {optimize=} 0 1

And here is when I try to run a query - which returns an empty result, even though the term is related to some items.

INFO  - 2014-05-29 11:25:05.624; org.apache.solr.request.UnInvertedField; UnInverted multi-valued field {field=tag,memSize=4288,tindexSize=0,time=0,phase1=0,nTerms=0,bigTerms=0,termInstances=0,uses=0}
INFO  - 2014-05-29 11:25:05.628; org.apache.solr.request.UnInvertedField; UnInverted multi-valued field {field=58_s,memSize=4288,tindexSize=0,time=0,phase1=0,nTerms=0,bigTerms=0,termInstances=0,uses=0}
INFO  - 2014-05-29 11:25:05.635; org.apache.solr.core.SolrCore; [omeka] webapp=/solr path=/select params={hl.fragsize=250&facet=true&facet.mincount=1&facet.limit=25&hl.fl=*_t&json.nl=map&wt=json&hl=true&rows=10&hl.snippets=1&start=0&facet.sort=count&q=Winter+Issue+1950-1951&facet.field=tag&facet.field=collection&facet.field=itemtype&facet.field=resulttype&facet.field=58_s} hits=0 status=0 QTime=32 
INFO  - 2014-05-29 11:25:07.339; org.apache.solr.core.SolrCore; [omeka] webapp=/solr path=/select params={hl.fragsize=250&facet=true&facet.mincount=1&facet.limit=25&hl.fl=*_t&json.nl=map&wt=json&hl=true&rows=10&hl.snippets=1&start=0&facet.sort=count&q=Winter+Issue+1950-1951&facet.field=tag&facet.field=collection&facet.field=itemtype&facet.field=resulttype&facet.field=58_s} hits=0 status=0 QTime=2 


Any idea as to why the site is not being indexed and how to fix it?



David McClure

unread,
May 29, 2014, 5:52:43 PM5/29/14
to omek...@googlegroups.com
Hey Anurag,

I bet the problem is that Omeka isn't able to find the PHP executable. Under the hood, SolrSearch uses a background process to shovel all of the documents into Solr, which, depending on the size of the collection, can take anywhere from a couple seconds to a couple minutes (too long to run inside of the web container). Try this - open up the Omeka configuration file at /application/config/config.ini, and go to line 165. Change the value of the jobs.dispatcher.longRunning key to match the value in the line above. So, you'll have:

jobs.dispatcher.longRunning = "Omeka_Job_Dispatcher_Adapter_Synchronous"

This just tells Omeka to run background processes synchronously inside the web request. Try reindexing, and see if it works. If so, then the real solution is to manually point Omeka at the correct PHP executable. Usually, it will work to just run `which php` on the command line, and paste the path as the value for the background.php.path key at line 151 in the config.ini (and change jobs.dispatcher.longRunning back to the original value). For example, if you're developing locally with something like MAMP, you'd have something like:

background.php.path = "/Applications/MAMP/bin/php/php5.5.10/bin/php"
...
jobs.dispatcher.longRunning = "Omeka_Job_Dispatcher_Adapter_BackgroundProcess"

Let me know if this fixes it! All best,
David


--
You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.
To post to this group, send email to omek...@googlegroups.com.
Visit this group at http://groups.google.com/group/omeka-dev.
For more options, visit https://groups.google.com/d/optout.

Anurag Spatzenegger

unread,
May 29, 2014, 6:23:27 PM5/29/14
to omek...@googlegroups.com
Dear David,

Thank you for your input - I had seen mention of that issue on Github before. I did the jobs.dispatcher.longRunning, but it did not make a difference in terms of the indexing.

Whenever I try to reindex, a new entry gets created in solr/example/multicore/omeka/data/tlog, but the indices themselves don't get modified.

When I look at solr.log, I am wondering whether something in those couple of lines is indicating as to why it is not writing anything.


INFO  - 2014-05-29 11:24:24.893; org.apache.solr.update.DirectUpdateHandler2; No uncommitted changes. Skipping IW.commit.
INFO  - 2014-05-29 11:24:24.893; org.apache.solr.core.SolrCore; SolrIndexSearcher has not changed - not re-opening: org.apache.solr.search.SolrIndexSearcher

Because it does not look to me, that the site has ever been indexed in the first place - at least no search via Solr returns any result at all.

All the best,

Anurag
--

Anurag Spatzenegger

unread,
Jun 5, 2014, 10:11:38 AM6/5/14
to omek...@googlegroups.com
Still at square one on this one… Does anybody else have a suggestion?

Anurag Spatzenegger

unread,
Jul 23, 2014, 3:07:40 PM7/23/14
to omek...@googlegroups.com
Revisiting this issue, as I still was not able to resolve it...
Reply all
Reply to author
Forward
0 new messages