You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by "Manjunath N S (mans3)" <ma...@cisco.com> on 2017/02/09 04:33:01 UTC

Datatype change in solr

Hello,

I had defined one of my field as string and indexed the data but it is of type integer. Now when I try to change the field type as tint ,to allow sorting to be performed on that field ,I am getting Async distributed error.
I have deleted the document with that id.


Is there a way to change the field types without deleting the index ?


Thanks,
manjunath



Re: Datatype change in solr

Posted by Shawn Heisey <ap...@elyograg.org>.
On 2/8/2017 9:33 PM, Manjunath N S (mans3) wrote:
> I had defined one of my field as string and indexed the data but it is
> of type integer. Now when I try to change the field type as tint ,to
> allow sorting to be performed on that field ,I am getting Async
> distributed error.
>
> I have deleted the document with that id.
>
>  
>
> Is there a way to change the field types without deleting the index ?
>

This question is more appropriate for the solr-user list.  I will
respond, but if this discussion needs to continue, it will need to be
moved to the other list.

When you delete a document, it doesn't actually get deleted.  That
record in the index is *marked* as deleted, but it still exists until
the index segment that contains it is merged into a new segment.

When you change the data type on a field, you must typically delete the
entire index and rebuild it from scratch.  If this is not done, then
Solr will try to interpret the data saved in the index with the old
configuration according to the new configuration, which frequently will
result in exceptions.

https://wiki.apache.org/solr/HowToReindex

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Datatype change in solr

Posted by Xavier Morera <xa...@familiamorera.com>.
Have you considered adding a copyfield and reindexing? Less disruptive.

On Wed, Feb 8, 2017 at 11:33 PM, Manjunath N S (mans3) <ma...@cisco.com>
wrote:

> Hello,
>
> I had defined one of my field as string and indexed the data but it is of
> type integer. Now when I try to change the field type as tint ,to allow
> sorting to be performed on that field ,I am getting Async distributed error.
> I have deleted the document with that id.
>
>
> Is there a way to change the field types without deleting the index ?
>
>
> Thanks,
> manjunath
>
>
>


-- 

*Xavier Morera*

Entrepreneur | Author & Trainer | Consultant | Developer & Scrum Master

*www.xaviermorera.com <http://www.xaviermorera.com/>*

office:  (305) 600-4919

cel:     +506 8849-8866

skype: xmorera
Twitter <https://twitter.com/xmorera> | LinkedIn
<https://www.linkedin.com/in/xmorera> | Pluralsight Author
<http://www.pluralsight.com/author/xavier-morera>

Re: Datatype change in solr

Posted by Xavier Morera <xa...@familiamorera.com>.
Have you considered adding a copyfield and reindexing? Less disruptive.

On Wed, Feb 8, 2017 at 11:33 PM, Manjunath N S (mans3) <ma...@cisco.com>
wrote:

> Hello,
>
> I had defined one of my field as string and indexed the data but it is of
> type integer. Now when I try to change the field type as tint ,to allow
> sorting to be performed on that field ,I am getting Async distributed error.
> I have deleted the document with that id.
>
>
> Is there a way to change the field types without deleting the index ?
>
>
> Thanks,
> manjunath
>
>
>


-- 

*Xavier Morera*

Entrepreneur | Author & Trainer | Consultant | Developer & Scrum Master

*www.xaviermorera.com <http://www.xaviermorera.com/>*

office:  (305) 600-4919

cel:     +506 8849-8866

skype: xmorera
Twitter <https://twitter.com/xmorera> | LinkedIn
<https://www.linkedin.com/in/xmorera> | Pluralsight Author
<http://www.pluralsight.com/author/xavier-morera>