Hello Erick/Emir
Thanks for your valuable suggestions. I will it keep in mind while doing
such operations.
Best,
Shubham
On Wed, Oct 23, 2019 at 5:56 PM Erick Erickson
wrote:
> Really, just don’t do this. Please. As others have pointed out, it may
> look like it works, but it won’t. I’ve
Really, just don’t do this. Please. As others have pointed out, it may look
like it works, but it won’t. I’ve spent many hours tracking down why clients
got weird errors after making changes like this, sometimes weeks later. Or more
accurately, if you choose to change field types without
Hi Shubham,
My guess that it might be working for text because it uses o.toString() so
there are no runtime errors while in case of others, it has to assume some
class so it does class casting. You can check in logs what sort of error
happens. But in any case, like Jason pointed out, that is a
Hi Jason
Thanks for the response.
You are right that re-indexing is required after making any changes to
Schema even i am re-indexing the docs in which i have
changed the fieldtypes, but here Emir is talking about full re-indexing
i.e. deleting the existing/core and creating new one that is
time
Hi Shubbham,
Emir gave you accurate advice - you cannot (safely) change field types
without reindexing. You may avoid errors for a time, and searches may
even return the results you expect. But the type-change is still a
ticking time bomb...Solr might try to merge segments down the road or
do
Hi Emir
As you have mentioned above we cannot change field type after indexing once
and we have to do dull re-indexing again, I tried to change field type from
plong to pint which has implemented class solr.LongPointField and
solr.IntPointField respectively and it was showing error as expected.
Hi Shubham,
No you cannot. What you can do is to use copy field or update request processor
to store is as some other field and use that in your query and ignore the old
one that will eventually disappear as the result of segment merges.
HTH,
Emir
--
Monitoring - Log Management - Alerting -
Hi Emir
Thanks for the reply, i got your point.
But is there any other way to do like one field could have two or more
different types defined ?
or if i talk about my previous query, can we index some data for the same
field with different unique id after replacing the type ?
Thanks again
Hi Shubham,
Changing type is not allowed without full reindexing. If you do something like
that, Solr will end up with segments with different types for the same field.
Remember that segments are immutable and that reindexing some document will be
in new segment, but old segment will still be
Hello Community
I have indexed some documents for which solr has taken its type="plongs" by
auto guessing but i am trying to change its type="pint" and re-indexing the
same data with the same id and indexing the data with different id where id
is unique key but it is showing error.
Can somebody
10 matches
Mail list logo