Open erochest opened 9 years ago
Not sure if this 18 month old issue is still relevant, but here are the changes I had to make to the solr_core
config to get it to work (indexing and search) with Solr 6.2:
solrconfig.xml
class="solr.JsonUpdateRequestHandler"
to class="UpdateRequestHandler"
(there's a single unified request handler in Solr 6)CSVRequestHandler
definitionAdminHandler
definition (it's included implicitly)schema.xml
solr.(Int|Long|Float|Double|Date)Field
to solr.Trie(Int|Long|Float|Double|Date)Field
enablePositionIncrements="(true|false)"
attributes from filtersunits="degrees"
from location_rpt
fieldType definitionThaiWordFilterFactory
seems to have gone, I remove the text_th
fieldType definition (perhaps including some of the extra lucene analysis libs would have fixed this instead.)I think that probably the schema changes would be compatible with Solr 4. Not sure about the config ones.
Thanks for sharing this. I can confirm above changes also work with Solr 6.3
Excellent advice @mikesname. Just got it working with Solr 6.3.0 too @benjaminh.
Hi benjaminh and MNicolou,
I am still having trouble making this to work. Could you please share some details of your setup? Particularly
Thanks in advance for your help.
You can follow http://lucene.apache.org/solr/quickstart.html for quickstart instructions. I did set up Solr as a standalone server (not sure if a solr installation under tomcat is supported as of solr 6.3 version)
You need to copy the omeka core folder into solr-6.3.0/server/solr
In my case, I'm still working on a localhost instance. So :
Thanks benjaminh!
I installed the standalone server and passed all the test in quickstart. i copied omeka core folder (SolrSearch/solr-core/omeka) to solr-6.3.0/server/solr/ restarted solr service when I opened http://solrserver:8983 I can see the admin dashboard. Do i have to add the omeka core through admin dashboard? Anyway, i modified the solrconfig.xml and schema.xml files to add the omeka core: name: omeka insancedir: solr-6.3.0/server/solr/omeka dataDir: data
core was added. but http://solrserver:8983/solr/omeka shows 404 error http://solrserver:8983/solr/#/~cores/omeka shows the core info, though.
In omeka SolrSearch plugin config page: Server Host: solrserver Server Port: 8983 Core URL: /solr/omeka says Solr connection is invalid.
any ideas?
Thanks again!
I'm not expert in solr, so I can only compare with my config.
instanceDir
and dataDir
manually (and dataDir should be solr-6.3.0/server/solr/omeka/data/
). These parameters should be visible on the admin dashboard. In my case, it shows full path to directories btw…benjaminh, thanks for your continued assistance. here is a rundown of what I did to try to make things work. say i have 2 servers, webserver and solrserver. webserver runs the omeka system and solrserver runs solr. i already have omeka running on webserver.
on solr server:
cd /root wget http://apache.claz.org/lucene/solr/6.3.0/solr-6.3.0.tgz tar zxvf ./solr-6.3.0.tgz cd solr-6.3.0/bin ./install_solr_service.sh /root/solr-6.3.0.tgz -d /var/log/solr -i /usr/local/ -p 8983 -s solr -u solr
Creating new user: solr
Extracting /root/solr-6.3.0.tgz to /usr/local/
Installing symlink /usr/local//solr -> /usr/local//solr-6.3.0 ...
Installing /etc/init.d/solr script ...
Installing /etc/default/solr.in.sh ...
Service solr installed.
Customize Solr startup configuration in /etc/default/solr.in.sh
Waiting up to 180 seconds to see Solr running on port 8983 []
Started Solr server on port 8983 (pid=22320). Happy searching!
Found 1 Solr nodes:
Solr process 22320 running on port 8983
{
"solr_home":"/var/log/solr/data",
"version":"6.3.0 a66a44513ee8191e25b477372094bfa846450316 - shalin - 2016-11-02 19:52:42",
"startTime":"2016-12-09T16:02:16.915Z",
"uptime":"0 days, 0 hours, 0 minutes, 10 seconds",
"memory":"12.7 MB (%2.6) of 490.7 MB"}
Next, I stoped the solr service:
service stop solr cd /root wget http://omeka.org/wordpress/wp-content/uploads/Solr-Search-2.3.0.zip unzip Solr-Search-2.3.0.zip
cp -a SolrSearch/solr-core/omeka /usr/local/solr-6.3.0/server/
mkdir /usr/local/solr-6.3.0/server/omeka/data chmod og+rwX /usr/local/solr-6.3.0/server/omeka/data
service solr start
Then I went to Omeka SolrSearch plug in configuration page on the webserver and put in Server Host: IP of solrserver Server Port: 8983 Core URL: /solr/omeka
and press "save setting" and the page just says: Solr connection is invalid.
Same thing if I install Solr on the same server as Omeka (i.e. on the webserver and use localhost in "Server Host" field.
I am not sure what i am doing wrong so that the handshaking btw omeka and solr does not happen.
Thanks for reading and helping!
One thing seems suspicious : when you copy solrsearch omeka core to solr installation, you mentioned
cp -a SolrSearch/solr-core/omeka /usr/local/solr-6.3.0/server/
. Destination folder should be /usr/local/solr-6.3.0/server/solr
that was a typo in the reply. yes it was copied into the solr directory.
how did you start your solr server?
Simply with command line : ./bin/solr start
in your solr-6.3.0 directory
ok. i made a little progress, but still not there yet. The funny thing about solr is that, when solr service is launched under root account, solr is not capable of loading any cores in server/solr/ directory automatically. third party cores can be automatically detected when solr is launched under a regular user account. I think this is a defect of solr. That said, when I launch solr as the user 'solr', the omeka core in solr-6.3.0/server/solr/omeka is automatically detected and loaded (verified via browser http://localhost:8983) however, omeka still complains that 'Solr connection is invalid.' when I used the following configuration: Server Host: localhost port: 8983 URL: /solr/omeka/
I am running out of thoughts!
Hi, I am trying to test Omeka Solr Search addon.
I have followed the apache quick guide. I decompressed solr on /home/user/bin/solr/ and launch it with:
run: bin/solr start -e cloud -noprompt
At this point, I am able to access to the solr administration interface (http://localhost:8983/solr/).
The problem is about the omeka core. I copied solr-core/omeka to /home/user/bin/solr-6.4.1/server/solr and restarted solr but the new core is not recognized. I tried also to put it with /home/user/bin/solr-6.4.1/example/cloud/ without success.
Is there something to do to install the omeka core?
@guitarscape I recently had some issues establishing a connection between two virtual machines (one for omeka, and one for solr). I don't know if this can help, but I found out that the "Solr connection is invalid" message is just the result of a http request to the solr instance (see helpers/SolrSearch_Helpers_Index.php
and lib/solr-php-client/Service.php
files. So maybe you can manually try to access the ping URL http://localhost:8983/solr/omeka/admin/ping
and see if you have more info on why it fails to connect
@pprw In the dashboard of the solr administration interface, among JVM settings, you should check that -Dsolr.solr.home
parameter is correctly set. In your case, it should be : /home/user/bin/solr-6.4.1/server/solr
I had the same issue once, I didn't figure out why solr came up with wrong settings (probably a misconfiguration from me), but manually correcting this parameter solved the issue.
I followed @mikesname amendments and the plugin works for me with Solr 7.0.1 too. However, with many warnings in logs. Hopefully this plugin is going to be adjusted for newer Solr?
EDIT: I only noticed a warning at the bottom of the page upon triggering a search: Strict Standards: Declaration of SolrSearchField::beforeSave() should be compatible with Omeka_Record_AbstractRecord::beforeSave($args) in xxx/plugins/SolrSearch/models/SolrSearchField.php on line 169
@benjaminh I was following @guitarscape's issues with configuring the server and a "Solr Connection Is Invalid Message." I made the solrconfig.xml and schema.xml amendments and have the Omeka core successfully running in Solr 7.0.1. I am getting the same message, but the ping URL isn't displaying any errors.
Any suggestions?
Thank you
hi germanychad,
two things i would suggest that you test is 1. disable SELinux and/or 2. disable firewall i don't recall clearly but it was some selinux boolean (httpd_can_network, or something like that) I had to turn on to allow traffic between apache and solr/java (between port 80 and port 8983). but don't turn off SElinux or firewall on production system. Only allow necessary traffic.
good luck.
I followed @mikesname s solution to modifying the files
A few notes though:
'--' is not allowed in comments, so when blocking off sections of xml that have comments contained within them, you get an exception.
And the line: ~1123 on solrconfig.xml is changed to AdminHandlers (looks like:
@piotreba , I ran into the same issue you did. Omeka has been updated since this plugin was last updated. On newer versions the SolrSearchField function takes and utilizes an argument in beforeSave(). This plugin uses the old version that doesn't supply one, so the argument is not needed. You can just add $args to the function declaration at the bottom of SolrSearchFile.php in \plugins\SolrSearch\models\SolrSearchField.php so that it matches the interface.
No.
Well, indexing works. Search doesn't.
I'm pushing this off for the next release, though.