Datatype change in solr

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Datatype change in solr

Manjunath N S (mans3)

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

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Datatype change in solr

Shawn Heisey-2
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Datatype change in solr

Xavier Morera
In reply to this post by Manjunath N S (mans3)
Have you considered adding a copyfield and reindexing? Less disruptive.

On Wed, Feb 8, 2017 at 11:33 PM, Manjunath N S (mans3) <[hidden email]> 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

office:  (305) 600-4919

cel:     +506 8849-8866

skype: xmorera
Twitter | LinkedIn | Pluralsight Author