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 Zahra Aminolroaya <z....@gmail.com> on 2018/10/17 11:36:30 UTC

Casting from schemaless to classic schema

I want to change my Solr from schemaless to classic schema.

I read 
https://stackoverflow.com/questions/29819854/how-does-solrs-schema-less-feature-work-how-to-revert-it-to-classic-schema
<https://stackoverflow.com/questions/29819854/how-does-solrs-schema-less-feature-work-how-to-revert-it-to-classic-schema> 
.


What would be the challenges that I will confront with as my schemaless
collection has some indexed documents in it?

In solr 7, is commenting add-unknown-fields-to-the-schema the only
difference between schemaless and classic schema?


Best,

Zahra



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Casting from schemaless to classic schema

Posted by Shawn Heisey <ap...@elyograg.org>.
On 10/17/2018 5:36 AM, Zahra Aminolroaya wrote:
> What would be the challenges that I will confront with as my schemaless
> collection has some indexed documents in it?

If the schema itself (the file named managed-schema that you might be 
renaming to schema.xml) hasn't changed, then the existing index will 
continue to work just fine, regardless of whether you're using the 
classic schema factory or not.

> In solr 7, is commenting add-unknown-fields-to-the-schema the only
> difference between schemaless and classic schema?

The add-unknown-fields update chain is not part of the schema.  It's in 
solrconfig.xml.  But it does *require* the managed schema in order to 
work.  The classic schema is immutable, can only be changed externally.

My personal opinion -- let Solr continue to use its default of the 
managed schema, but remove and disable the add-unknown-fields update 
chain.  It is the update chain that creates schemaless mode.

Thanks,
Shawn


Re: Casting from schemaless to classic schema

Posted by Zahra Aminolroaya <z....@gmail.com>.
Thanks Alexandre and Shawn. 



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Casting from schemaless to classic schema

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
It is not clear what you are trying to achieve?
1) Disable schemaless mode to be more explicit about new fields? New
Solr has a switch for that. Older one, you can just disable the chain
invocation in solrconfig.xml
2) Stop schema being editing at all, whether schemaless or via API?
There is a flag in solrconfig.xml to make it immutable.
https://lucene.apache.org/solr/guide/7_5/schema-factory-definition-in-solrconfig.html
- this also has instructions that seem even more relevant to your
specific question.

Regards,
   Alex.

On Wed, 17 Oct 2018 at 07:36, Zahra Aminolroaya <z....@gmail.com> wrote:
>
> I want to change my Solr from schemaless to classic schema.
>
> I read
> https://stackoverflow.com/questions/29819854/how-does-solrs-schema-less-feature-work-how-to-revert-it-to-classic-schema
> <https://stackoverflow.com/questions/29819854/how-does-solrs-schema-less-feature-work-how-to-revert-it-to-classic-schema>
> .
>
>
> What would be the challenges that I will confront with as my schemaless
> collection has some indexed documents in it?
>
> In solr 7, is commenting add-unknown-fields-to-the-schema the only
> difference between schemaless and classic schema?
>
>
> Best,
>
> Zahra
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html