You have to reindex everything, the field cannot be converted. Updating single fields is not possible (maybe in future, see wiki).
If you use the field cache (sorting against numeric fields) it is very important to not have any legacy terms in the index, so the best is to start with an empty index. If you do not sort, NumericRangeQuery will simply not hit any documents using another encoding. ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: Siraj Haider [mailto:si...@jobdiva.com] > Sent: Tuesday, October 20, 2009 5:47 PM > To: java-user@lucene.apache.org > Subject: Using NumericField > > We have an index with a number field indexed as String field. We do > range searches as well as sorting on this field. Now we want to take > advantage of the NumericField. The question is, will I have to re-index > all the documents or just adding a new document with NumericField will > be enough to convert the field type? If a re-index is needed, is there > a way to re-index just one field in a document instead of re-indexing > the whole document? > > thanks > > > > This electronic mail message and any attachments may contain information > which is privileged, sensitive and/or otherwise exempt from disclosure > under applicable law. The information is intended only for the use of the > individual or entity named as the addressee above. If you are not the > intended recipient, you are hereby notified that any disclosure, copying, > distribution (electronic or otherwise) or forwarding of, or the taking of > any action in reliance on, the contents of this transmission is strictly > prohibited. If you have received this electronic transmission in error, > please notify us by telephone, facsimile, or e-mail as noted above to > arrange for the return of any electronic mail or attachments. Thank You. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org