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 Kojo <rb...@gmail.com> on 2018/04/17 14:15:38 UTC

Schemaless mode question

Hi all,

I am trying schemaless mode and it seems to works very nice, and there is
no overhead to write a custom schema for each type of collection that we
need to index.
However we are facing a strange problem. Once we have created a collection
and indexed data on that collection, if we need to make some change on data
(change data type), even if we delete the collection, restart all solr
instances, create the collection again, the new auto schema is not
recreated and the former auto generated schema is still there.

The only workaround that i have found to solve this, is to create a new
collection with a different name.

Is this a known bug on Solr 6.6 or am I missing something?

Thanks in advance,

Re: Schemaless mode question

Posted by Kojo <rb...@gmail.com>.
I have just deleted using command line and worked as expected!



2018-04-17 11:15 GMT-03:00 Kojo <rb...@gmail.com>:

> Hi all,
>
> I am trying schemaless mode and it seems to works very nice, and there is
> no overhead to write a custom schema for each type of collection that we
> need to index.
> However we are facing a strange problem. Once we have created a collection
> and indexed data on that collection, if we need to make some change on data
> (change data type), even if we delete the collection, restart all solr
> instances, create the collection again, the new auto schema is not
> recreated and the former auto generated schema is still there.
>
> The only workaround that i have found to solve this, is to create a new
> collection with a different name.
>
> Is this a known bug on Solr 6.6 or am I missing something?
>
> Thanks in advance,
>
>

Re: Schemaless mode question

Posted by Kojo <rb...@gmail.com>.
 Shawn,
I first deleted the collection from the admin interface. It didn´t work.

When I deleted direct on command line it worked:
 /opt/solr-6.6.2/bin/solr delete -c <my collection>


Thanks for the advice on using schemaless on production. I understand the
potential problems, so I will first create schema automagically on
schemaless mode, download it adjust and upload to zk as described on the
documentation.

Thanks,
Robson




2018-04-17 11:49 GMT-03:00 Shawn Heisey <ap...@elyograg.org>:

> On 4/17/2018 8:15 AM, Kojo wrote:
> > I am trying schemaless mode and it seems to works very nice, and there is
> > no overhead to write a custom schema for each type of collection that we
> > need to index.
> > However we are facing a strange problem. Once we have created a
> collection
> > and indexed data on that collection, if we need to make some change on
> data
> > (change data type), even if we delete the collection, restart all solr
> > instances, create the collection again, the new auto schema is not
> > recreated and the former auto generated schema is still there.
> >
> > The only workaround that i have found to solve this, is to create a new
> > collection with a different name.
> >
> > Is this a known bug on Solr 6.6 or am I missing something?
>
> We recommend NOT using schemaless mode in production.  It is not always
> able to make the right guess for the fieldType of the data it
> encounters.  In production, it's generally better to have Solr throw an
> error when it encounters unknown fields, and then for you to manually
> adjust the schema with the fieldType that is correct for the new field.
> If the wrong guess is made and you have to change the schema, then you
> will have to re-index.
>
> Without knowing precisely what steps/commands/requests you used for all
> of the actions you have described, it is very difficult to know if
> there's a problem with Solr or if one of the steps taken was incorrect.
> Can you fill in the details?
>
> Thanks,
> Shawn
>
>

Re: Schemaless mode question

Posted by Shawn Heisey <ap...@elyograg.org>.
On 4/17/2018 8:15 AM, Kojo wrote:
> I am trying schemaless mode and it seems to works very nice, and there is
> no overhead to write a custom schema for each type of collection that we
> need to index.
> However we are facing a strange problem. Once we have created a collection
> and indexed data on that collection, if we need to make some change on data
> (change data type), even if we delete the collection, restart all solr
> instances, create the collection again, the new auto schema is not
> recreated and the former auto generated schema is still there.
>
> The only workaround that i have found to solve this, is to create a new
> collection with a different name.
>
> Is this a known bug on Solr 6.6 or am I missing something?

We recommend NOT using schemaless mode in production.  It is not always
able to make the right guess for the fieldType of the data it
encounters.  In production, it's generally better to have Solr throw an
error when it encounters unknown fields, and then for you to manually
adjust the schema with the fieldType that is correct for the new field. 
If the wrong guess is made and you have to change the schema, then you
will have to re-index.

Without knowing precisely what steps/commands/requests you used for all
of the actions you have described, it is very difficult to know if
there's a problem with Solr or if one of the steps taken was incorrect. 
Can you fill in the details?

Thanks,
Shawn