Hi Nitin,

To update the schema using Curl in Solr 5.0, we can use the following
command if we are using ManagedIndexSchemaFactory:

curl -X POST -H 'Content-type:application/json' --data-binary '{
    "add-field" : {
        "name":"sell-by",
        "type":"tdate",
        "stored":true}
}' http://localhost:8983/solr/gettingstarted/schema

In Solr 5.0, that is the default setting in solrconfig.xml, and there's no
physical schema.xml, Solr will load the schema from the resource named in
'managedSchemaResourceName', rather than from schema.xml.

For solrconfig.xml, we still have to update directory onto the file.

Zheng Lin



On 12 March 2015 at 16:20, Nitin Solanki <nitinml...@gmail.com> wrote:

> Hi Zheng,
>
>
> *** I understand that in Solr 5.0, they provide a REST API to do real-time
> update of the schema using Curl ** *. Would please help me how to do this?
> I need to update both schema.xml and solrconfig.xml in Solr 5.0 in
> SolrCloud.
> Your help is appreciated..
>
> *Thanks Again..*
>
>
> On Thu, Mar 12, 2015 at 1:30 PM, Zheng Lin Edwin Yeo <edwinye...@gmail.com
> >
> wrote:
>
> > Hi,
> >
> > I understand that in Solr 5.0, they provide a REST API to do real-time
> > update of the schema using Curl. However, I could not do that for my
> > eariler version of Solr 4.10.1.
> >
> > Would like to check, is this function available for the earlier version
> of
> > Solr, and is the curl syntax the same as Solr 5.0?
> >
> > Regards,
> > Edwin
> >
>

Reply via email to