Hi guys,
wondering if there is any proper way to access Schema API via Solrj.

Of course is possible to reach them in Java with a specific Http Request,
but in this way, using SolrCloud for example we become coupled to one
specific instance ( and we don't want) .

Code Example :

            HttpResponse httpResponse;
>             String url=this.solrBase+"/"+core+ SCHEMA_SOLR_FIELDS_ENDPOINT
> +fieldName;
>             HttpPut httpPut = new HttpPut(url);
>             StringEntity entity = new StringEntity(
>                     "{\"type\":\"text_general\",\"stored\":\"true\"}" ,
>                     ContentType.APPLICATION_JSON);
>              httpPut.setEntity( entity );
>              HttpClient client=new DefaultHttpClient();
>              response = client.execute(httpPut);


Any suggestion ?
In my opinion should be interesting to have some auxiliary method in
SolrServer if it's not there yet.

Cheers

-- 
--------------------------

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Reply via email to