Thanks for your quick reply. What would be a reasonable way to handle this without affecting the end users?
Create a new dynamic core with the new schema, load documents to the new core, then swap the cores? At some moments, two mostly identical cores co-exist on solr server, would that impact query time? -----Original Message----- From: Shalin Shekhar Mangar [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 28, 2008 1:33 Joe To: solr-user@lucene.apache.org Subject: Re: Changing field datatype On Wed, Oct 29, 2008 at 1:55 AM, Nguyen, Joe <[EMAIL PROTECTED]> wrote: > > 1. If I modify datatype of a field 'foo' from string to a sint and > restart the server, what would happen to the existing documents? And > documents added with the new schema? At query time (sort=foo desc), > should I expect the documents sorted properly? Do I need to re-index all documents? The fields can't be converted automatically. Therefore, a sort on foo will still be a lexical sort instead of a numerical sort. You'll have to re-index to have "foo desc" give a numerically non-ascending sort order. > 2. If I add two additional fields, do I need to re-index again? The old documents won't have any values for those fields of course but new documents will. It is best to re-index to avoid any inconsistencies. -- Regards, Shalin Shekhar Mangar.