To get the schema.xml file, look at how Solr's admin/index.jsp fetches
it under the "Schema" button.

You cannot get a nice, cleanly parsed schema object tree from SolrJ.

On Tue, Jun 8, 2010 at 5:16 AM, Peter Karich <peat...@yahoo.de> wrote:
> Hi Raakhi,
>
> I am not sure if I understand your usecase correctly,
> but if you need this custom location to test against an
> existing schema/config file I found this snippet [1].
>
> Otherwise the solr home can be set with
>
> -Dsolr.solr.home=/opt/solr/example"
>
> more information is available here [2]
>
> Regards,
> Peter.
>
> [1]
> public class SolrTest extends AbstractSolrTestCase {
>
>   �...@override
>    public String getSchemaFile() {
>        return "solr/conf/schema.xml";
>    }
>
>   �...@override
>    public String getSolrConfigFile() {
>        return "solr/conf/solrconfig.xml";
>    }
>
>   �...@before
>   �...@override
>    public void setUp() throws Exception {
>        super.setUp();
>
>        server = new EmbeddedSolrServer(h.getCoreContainer(),
> h.getCore().getName());
>    }
>
>   �...@after
>   �...@override
>    public void tearDown() throws Exception {
>        super.tearDown();
>    }
> ...
>
> [2]
> http://wiki.apache.org/solr/SolrTomcat
>
>> Hi,
>>           Is there any way to create an IndexSchema from a
>> CommonsHttpSolrServer. (where u don't know the location of schema.xml and
>> solrconfig.xml or those files are in some other machine.)
>>
>> I tried looking for solrJ api's for the same. but coudn't find it.
>>
>> or is there any way to retrieve schema file from the index using solrj?
>> schema.xml file can be retrieved from
>> http://localhost:8983/solr/CoreX/admin/file/?file=schema.xml
>>
>> Any Pointers???
>>
>> Regards,
>> Raakhi
>>
>>
>
>



-- 
Lance Norskog
goks...@gmail.com

Reply via email to