Thanks for your response. 

But it seems like there should be a way to issue the equivalent of 

        http://localhost:8983/solr/schema/version

which returns 

  {
  "responseHeader":{
     "status":0,
     "QTime":4},
     "version":1.5}

from the server.  I know how to do it using HTTPGet in Android, but I can't use 
that in my desktop app because sometimes I'm connected to a local set of files 
using an embedded SolrJ server.  It seems silly to write a bunch of code to 
parse the files myself when Solr already does it so well.

There does not seem to be a request handler to use to issue such a call nor a 
direct API.

Has anyone ever gotten this information from the server using SolrJ?

Steven







On Jul 6, 2013, at 2:34 PM, Jason Hellman wrote:

> Steven,
> 
> Some information can be gleaned from the "system" admin request handler:
> 
> http://localhost:8983/solr/admin/system
> 
> I am specifically looking at this:
> 
> <lst name="core"><str name="schema">example</str>
> 
> Mind you, that is a manually-set value in the schema file.  But just in case 
> you want to get crazy you can also call the "file" admin request handler:
> 
> http://localhost:8983/solr/admin/file?file=schema.xml
> 
> …and parse the whole stinking thing :)
> 
> Jason
> 
> 
> On Jul 6, 2013, at 1:59 PM, Steven Glass <steven.gl...@zekira.com> wrote:
> 
>> Does anyone have any idea how I can access the schema version info using 
>> SolrJ?
>> 
>> Thanks.
>> 
>> 
>> On Jul 3, 2013, at 4:16 PM, Steven Glass wrote:
>> 
>>> I'm using a Solr 4.3 server and accessing it from both a Java based desktop 
>>> application using SolrJ and an Android based mobile application using my 
>>> home-grown REST adaptor.  I'm trying to make sure that versions of the 
>>> application are synchronized with updates to the server (too often testers 
>>> forget to update an app when the server changes).  I want to read the 
>>> schema version from the server and make sure it is the expected value.
>>> 
>>> This was very easy to do using my home-grown REST adaptor.  The wiki 
>>> examples at http://wiki.apache.org/solr/SchemaRESTAPI were sufficient. 
>>> 
>>> Unfortunately, I cannot figure out how to do the equivalent with SolrJ.  I 
>>> suspect that there is a really simple approach but I'm just missing it.
>>> 
>>> Thanks in advance for any guidance you can offer.
>>> 
>>> Best regards,
>>> 
>>> Steven Glass
>> 
> 

Reply via email to