How do I find out version of currently running Solr?
Asked Answered
F

9

72

Please tell me how can I determine the version number of currently running solr ?

Footman answered 7/3, 2010 at 3:43 Comment(0)
E
62

On the Solr Admin page click on [INFO]. The next screen will have the version.

(For me, the Solr admin page is located here: http://{host-name-or-ip}:{port}/solr/admin, I found I was dealing with an older version. Solr Specification Version: 1.4.0 Solr Implementation Version: 1.4.0 833479)

info in Solr Admin

Ermaermanno answered 1/6, 2011 at 16:52 Comment(1)
Is there a way to get this if you do not have Admin access to the index? As in if hosted by a 3rd party provider?Saprolite
C
53

With a HTTP GET request to:

yoursolrhost:8983/solr/admin/info/system

you'll retrieve a structure in many different representations (xml, json, php, python,...).

the lucene key of the structure contains version numbers.

For example, using json output:

http://yoursolrhost:8983/solr/admin/info/system?wt=json

The lucene key looks like this:

"lucene": {
    "solr-spec-version": "4.6.0",
    "solr-impl-version": "4.6.0 1543363 - simon - 2013-11-19 11:16:33",
    "lucene-spec-version": "4.6.0",
    "lucene-impl-version": "4.6.0 1543363 - simon - 2013-11-19 11:05:50"
},
Colombes answered 18/3, 2014 at 13:14 Comment(3)
oddly i get null for all of theseRiehl
@Riehl It isnt visible for me either, neither is it showing up on the UI.. how did you check the solr version?Groth
@Colombes Thanks solr was not accessible in the browser - you saved my dayOsman
A
14

solr admin "infos" button links to "admin/registry.jsp"

so you can get the version with :

wget -O- "http://solr_ip_adress.lan:8080/solr/admin/registry.jsp" | grep 'solr-spec-version'

Austrasia answered 25/9, 2013 at 8:50 Comment(0)
C
12

You could use http://localhost:8983/solr/admin/info/system?wt=json to gather the details and Solr version too.

Tested on Solr v6.6.0

Cheviot answered 16/2, 2018 at 22:2 Comment(0)
M
5

You need to query Solr using the SystemInfoHandler:

http://lucene.apache.org/solr/api/org/apache/solr/handler/admin/SystemInfoHandler.html

Monogyny answered 7/3, 2010 at 3:52 Comment(4)
When clicked info on admin page i got Solr Specification Version: 1.4.0.2009.11.19.08.31.18 Solr Implementation Version: 1.5-dev 882138 - grantingersoll - 2009-11-19 08:31:18 so is it 1.5-dev that am using.Footman
@kshama: yes, it's 1.5 svn revision 882138Insentient
Can you provide an example query in your answer? I am quite new to Solr. Thanks.Rabi
@Brad: I wish I could.. this answer is about 2 years old and I don't even remember answering :)Monogyny
T
5

You can simply go to your Solr Dashboard page as in URL

http://localhost:8983/solr
Thylacine answered 19/2, 2014 at 9:23 Comment(0)
G
0

Assumption, you use version 3.6, port 8080. Go to http://localhost:8080/solr/default/admin/registry.jsp

You will see result:

Solr Implementation Version: 3.6.0 1310449 - rmuir - 2012-04-06 11:34:07
Gyniatrics answered 13/7, 2017 at 7:4 Comment(0)
F
0

From the command line of a Linux server running solr:

sudo service solr status

Depending on your version of Linux, I imagine you might have to modify that to use systemctl instead of service, or other means of calling the solr service.

Folder answered 31/12, 2021 at 3:52 Comment(1)
Since I return to this SO result each time I have to look up how to do this again, I figure this answer is needed.Folder
F
0

Using shell

From https://endoflife.date/solr

You can check the version that you are currently using by running:
bin/solr version

But the path mentioned is relative. So we still have to find the workingdir...

Attempt standard location?

$ ls -la /opt/solr

lrwxrwxrwx 1 root root 15 Feb  5 03:51 /opt/solr -> /opt/solr-8.6.0

$ /opt/solr/bin/solr version

8.6.0
Or: attempt to locate it by searching for the executable itself

$ find / -executable -type f -name solr 2>/dev/null

/opt/solr-8.6.0/bin/solr
/opt/solr-8.6.0/bin/init.d/solr
Ferrin answered 5/7 at 2:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.