You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Jamal, Sarfaraz" <Sa...@VerizonWireless.com.INVALID> on 2016/06/03 15:22:29 UTC

RE: [E] Re: Stemming and Managed Schema

Awesome,

So just to make sure I got it right:

I would edit the managed-schema, make my changes, shutdown solr? And start it back up and verify it is still there?

Or is there another way to reload the core/collection?

Thanks!

Sas



-----Original Message-----
From: Shawn Heisey [mailto:apache@elyograg.org] 
Sent: Friday, June 3, 2016 11:17 AM
To: solr-user@lucene.apache.org
Subject: [E] Re: Stemming and Managed Schema

On 6/3/2016 9:07 AM, Jamal, Sarfaraz wrote:
> I found the following article:
> http://thinknook.com/keyword-stemming-and-lemmatisation-with-apache-so
> lr-2013-08-02/
>
> And I want to do stemming on one of our fields.
>
> However, I am using a Managed Schema and I am unsure how to add these 
> two blocks to it -
>
> I know there is an API for managed schemas, would that support these additions?

You can't edit an existing fieldType with the Schema API.  You can entirely replace it, but you have to include the whole definition.

https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-ReplaceaFieldType

I'm aware that the managed-schema file says to not make manual edits -- but you *can* edit it manually, as long as you are absolutely sure that nobody is using the Schema API until after you complete your edits and reload the core/collection.

Thanks,
Shawn


Re: [E] Re: Stemming and Managed Schema

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Oops, ignore. Shawn answered that with a link earlier. I was reading
this on the phone....
----
Newsletter and resources for Solr beginners and intermediates:
http://www.solr-start.com/


On 5 June 2016 at 14:32, Alexandre Rafalovitch <ar...@gmail.com> wrote:
> Isn't just reloading the core via Admin interface sufficient?
>
> I though that all Solr driven changes are written out to managed-schema at
> once, so as long as core is reloaded right after manual changes, it should
> be OK.
>
> Regards,
>     Alex
>
> On 4 Jun 2016 10:12 am, "Erick Erickson" <er...@gmail.com> wrote:
>>
>> Actually, I prefer to do it the other way:
>>
>> 1> shut down Solr
>> 2> edit managed_schema
>> 3> start Solr.
>>
>> that eliminates any possibility of inadvertently overwriting your
>> changes by issuing a managed schema call.
>>
>> that's a nit though, either will work.
>>
>>
>> FWIW,
>> Erick
>>
>> On Fri, Jun 3, 2016 at 11:02 AM, Shawn Heisey <ap...@elyograg.org> wrote:
>> > On 6/3/2016 9:22 AM, Jamal, Sarfaraz wrote:
>> >> I would edit the managed-schema, make my changes, shutdown solr? And
>> >> start it back up and verify it is still there?
>> >
>> > That's the sledgehammer approach.  Simple and effective, but Solr does
>> > go offline for a short time.
>> >
>> >> Or is there another way to reload the core/collection?
>> >
>> > For SolrCloud:
>> >
>> > https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api2
>> >
>> > For non-cloud mode:
>> >
>> > https://cwiki.apache.org/confluence/display/solr/CoreAdmin+API#CoreAdminAPI-RELOAD
>> >
>> > Thanks,
>> > Shawn
>> >

Re: [E] Re: Stemming and Managed Schema

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Isn't just reloading the core via Admin interface sufficient?

I though that all Solr driven changes are written out to managed-schema at
once, so as long as core is reloaded right after manual changes, it should
be OK.

Regards,
    Alex
On 4 Jun 2016 10:12 am, "Erick Erickson" <er...@gmail.com> wrote:

> Actually, I prefer to do it the other way:
>
> 1> shut down Solr
> 2> edit managed_schema
> 3> start Solr.
>
> that eliminates any possibility of inadvertently overwriting your
> changes by issuing a managed schema call.
>
> that's a nit though, either will work.
>
>
> FWIW,
> Erick
>
> On Fri, Jun 3, 2016 at 11:02 AM, Shawn Heisey <ap...@elyograg.org> wrote:
> > On 6/3/2016 9:22 AM, Jamal, Sarfaraz wrote:
> >> I would edit the managed-schema, make my changes, shutdown solr? And
> >> start it back up and verify it is still there?
> >
> > That's the sledgehammer approach.  Simple and effective, but Solr does
> > go offline for a short time.
> >
> >> Or is there another way to reload the core/collection?
> >
> > For SolrCloud:
> >
> https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api2
> >
> > For non-cloud mode:
> >
> https://cwiki.apache.org/confluence/display/solr/CoreAdmin+API#CoreAdminAPI-RELOAD
> >
> > Thanks,
> > Shawn
> >
>

Re: [E] Re: Stemming and Managed Schema

Posted by Erick Erickson <er...@gmail.com>.
Actually, I prefer to do it the other way:

1> shut down Solr
2> edit managed_schema
3> start Solr.

that eliminates any possibility of inadvertently overwriting your
changes by issuing a managed schema call.

that's a nit though, either will work.


FWIW,
Erick

On Fri, Jun 3, 2016 at 11:02 AM, Shawn Heisey <ap...@elyograg.org> wrote:
> On 6/3/2016 9:22 AM, Jamal, Sarfaraz wrote:
>> I would edit the managed-schema, make my changes, shutdown solr? And
>> start it back up and verify it is still there?
>
> That's the sledgehammer approach.  Simple and effective, but Solr does
> go offline for a short time.
>
>> Or is there another way to reload the core/collection?
>
> For SolrCloud:
> https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api2
>
> For non-cloud mode:
> https://cwiki.apache.org/confluence/display/solr/CoreAdmin+API#CoreAdminAPI-RELOAD
>
> Thanks,
> Shawn
>

Re: [E] Re: Stemming and Managed Schema

Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/3/2016 9:22 AM, Jamal, Sarfaraz wrote:
> I would edit the managed-schema, make my changes, shutdown solr? And
> start it back up and verify it is still there? 

That's the sledgehammer approach.  Simple and effective, but Solr does
go offline for a short time.

> Or is there another way to reload the core/collection?

For SolrCloud:
https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api2

For non-cloud mode:
https://cwiki.apache.org/confluence/display/solr/CoreAdmin+API#CoreAdminAPI-RELOAD

Thanks,
Shawn