This question about Using an extension: Answered

Foswiki / Solr / Jetty integration

I have set up SolrPlugin on a fresh Foswiki 1.1.8 installation, using DebianPackage, on Ubuntu 12.04 server. Jetty is also running locally and the following URL returns something that looks good to me : http://localhost:8080/solr/admin/ping?wt=json

So I've changed the {SolrPlugin}{Url} to be http://localhost:8080/solr

My problem is nos the same as the one described in Question1135 . The output of /var/lib/foswiki/tools/solrindex topic=Main.WebHome is :

Deleting document Main
Deleting documents by query web:Main topic:WebHome
ERROR: 400 undefined field web: <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 400 undefined field web</title>
</head>
<body><h2>HTTP ERROR 400</h2>
<p>Problem accessing /solr/update. Reason:
<pre> undefined field web</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

</body>
</html>
at /var/lib/foswiki/lib/WebService/Solr.pm line 180
WebService::Solr::_send_update('WebService::Solr=HASH(0x43b64a8)', 'XML::Generator::overload=ARRAY(0x476d6e8)') called at /var/lib/foswiki/lib/WebService/Solr.pm line 127
WebService::Solr::delete_by_query('WebService::Solr=HASH(0x43b64a8)', 'web:Main topic:WebHome') called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 683
Foswiki::Plugins::SolrPlugin::Index::__ANON__() called at /usr/share/perl5/Error.pm line 416
eval {...} called at /usr/share/perl5/Error.pm line 408
Error::subs::try('CODE(0x45e49b0)', 'HASH(0x457baf0)') called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 688
Foswiki::Plugins::SolrPlugin::Index::deleteByQuery('Foswiki::Plugins::SolrPlugin::Index=HASH(0x207c450)', 'web:Main topic:WebHome') called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 663
Foswiki::Plugins::SolrPlugin::Index::deleteTopic('Foswiki::Plugins::SolrPlugin::Index=HASH(0x207c450)', 'Main', 'WebHome', undef) called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 209
Foswiki::Plugins::SolrPlugin::Index::updateTopic('Foswiki::Plugins::SolrPlugin::Index=HASH(0x207c450)', 'Main', 'Main.WebHome') called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 69
Foswiki::Plugins::SolrPlugin::Index::__ANON__() called at /usr/share/perl5/Error.pm line 416
eval {...} called at /usr/share/perl5/Error.pm line 408
Error::subs::try('CODE(0x440eab8)', 'HASH(0x44257a8)') called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 87
Foswiki::Plugins::SolrPlugin::Index::index('Foswiki::Plugins::SolrPlugin::Index=HASH(0x207c450)') called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin.pm line 145
Foswiki::Plugins::SolrPlugin::indexCgi('Foswiki=HASH(0x207c480)') called at /var/lib/foswiki/lib/Foswiki/UI.pm line 316
Foswiki::UI::__ANON__() called at /usr/share/perl5/Error.pm line 416
eval {...} called at /usr/share/perl5/Error.pm line 408
Error::subs::try('CODE(0x2075f38)', 'HASH(0x2a2d1d8)') called at /var/lib/foswiki/lib/Foswiki/UI.pm line 435
Foswiki::UI::_execute('Foswiki::Request=HASH(0x238c1f0)', 'CODE(0x2a23b90)', 'command_line', 1, 'solrindex', 1) called at /var/lib/foswiki/lib/Foswiki/UI.pm line 274
Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x238c1f0)') called at /var/lib/foswiki/lib/Foswiki/Engine/CLI.pm line 53
Foswiki::Engine::CLI::run('Foswiki::Engine::Legacy=HASH(0x232cc08)') called
Indexing topic Main
ERROR: 400 ERROR: [doc=Main.WebHome] unknown field 'contributor': <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 400 ERROR: [doc=Main.WebHome] unknown field 'contributor'</title>
</head>
<body><h2>HTTP ERROR 400</h2>
<p>Problem accessing /solr/update. Reason:
<pre> ERROR: [doc=Main.WebHome] unknown field 'contributor'</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>

</body>
</html>
at /var/lib/foswiki/lib/WebService/Solr.pm line 180
WebService::Solr::_send_update('WebService::Solr=HASH(0x43b64a8)', 'XML::Generator::overload=ARRAY(0x457c408)') called at /var/lib/foswiki/lib/WebService/Solr.pm line 73
WebService::Solr::add('WebService::Solr=HASH(0x43b64a8)', 'WebService::Solr::Document=HASH(0x457fe40)') called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 596
Foswiki::Plugins::SolrPlugin::Index::add('Foswiki::Plugins::SolrPlugin::Index=HASH(0x207c450)', 'WebService::Solr::Document=HASH(0x457fe40)') called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 454
Foswiki::Plugins::SolrPlugin::Index::__ANON__() called at /usr/share/perl5/Error.pm line 416
eval {...} called at /usr/share/perl5/Error.pm line 408
Error::subs::try('CODE(0x477ba40)', 'HASH(0x4787108)') called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 459
Foswiki::Plugins::SolrPlugin::Index::indexTopic('Foswiki::Plugins::SolrPlugin::Index=HASH(0x207c450)', 'Main', 'WebHome', undef, undef) called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 210
Foswiki::Plugins::SolrPlugin::Index::updateTopic('Foswiki::Plugins::SolrPlugin::Index=HASH(0x207c450)', 'Main', 'Main.WebHome') called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 69
Foswiki::Plugins::SolrPlugin::Index::__ANON__() called at /usr/share/perl5/Error.pm line 416
eval {...} called at /usr/share/perl5/Error.pm line 408
Error::subs::try('CODE(0x440eab8)', 'HASH(0x44257a8)') called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 87
Foswiki::Plugins::SolrPlugin::Index::index('Foswiki::Plugins::SolrPlugin::Index=HASH(0x207c450)') called at /var/lib/foswiki/lib/Foswiki/Plugins/SolrPlugin.pm line 145
Foswiki::Plugins::SolrPlugin::indexCgi('Foswiki=HASH(0x207c480)') called at /var/lib/foswiki/lib/Foswiki/UI.pm line 316
Foswiki::UI::__ANON__() called at /usr/share/perl5/Error.pm line 416
eval {...} called at /usr/share/perl5/Error.pm line 408
Error::subs::try('CODE(0x2075f38)', 'HASH(0x2a2d1d8)') called at /var/lib/foswiki/lib/Foswiki/UI.pm line 435
Foswiki::UI::_execute('Foswiki::Request=HASH(0x238c1f0)', 'CODE(0x2a23b90)', 'command_line', 1, 'solrindex', 1) called at /var/lib/foswiki/lib/Foswiki/UI.pm line 274
Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x238c1f0)') called at /var/lib/foswiki/lib/Foswiki/Engine/CLI.pm line 53
Foswiki::Engine::CLI::run('Foswiki::Engine::Legacy=HASH(0x232cc08)') called
Committing index


What suggested in Question1135 does not help here.

I have noticed that some files are newer on the git version of the SolrPlugin, and I've tried to put in place these files, but no luck there.

Maybe this is about the schema.xml file ? the one provided is ./solr/solr/conf/schema.xml Is there something that must be manually done with this file ?

-- MichelMallejac - 01 May 2013

Please have a look at the new SolrPlugin 3.0.0 which drastically simplifies the integration. Solr now comes as a stand-alone service. Support for running a solr.war under your own jetty is deprecated and might not work anymore in the near future. Using tomcat isn't recommended anymore. See the docu which should be much clearer now as well, hopefully smile

-- MichaelDaum - 27 Feb 2015
 

QuestionForm edit

Subject Using an extension
Extension SolrPlugin
Version Foswiki 1.1.8
Status Answered
Related Topics
Topic revision: r2 - 27 Feb 2015, MichaelDaum
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