lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Stephens <Andrew.Steph...@nu-ins.com>
Subject How to handle change to index definition?
Date Wed, 10 Jun 2015 12:00:12 GMT
Let’s say I’ve been writing documents to the index for some time, then I decide to make
a change to the index. This could be adding or removing a field, or changing how one of the
fields is configured (e.g. changing the Field.Store or Field.Index parameter).

Assuming that I need this change to apply to old documents, is the only course of action to
delete the index then add all the documents from scratch? And is “_writer.DeleteAll()”
sufficient or would I need to delete the FS directory?

(I’ve used RavenDB in the past, which is built on Lucene, and that detects when you’ve
changed the index definition, and applies the changes. I presume it must be doing something
similar, i.e. deleting and recreating the index on a background thread).



Andrew Stephens | Senior Software Engineer
Andrew.Stephens@nu-ins.com<mailto:Andrew.Stephens@nu-ins.com>   [cid:imagec71ffe.PNG@d62c0326.42921d9c]
T: +44 (0) 1978 661304  |  F: +44 (0) 1978 664301  |


  W: www.nu-ins.com<http://www.nu-ins.com>


Unit 74 Clywedog Road South, Wrexham Industrial Estate, Wrexham,  LL13 9XS | Nu Instruments
Ltd is registered in England, No.: 3046042. Registered Office: Seacourt Tower, West Way, Oxford
OX2 0FB. VAT No.: GB 616 3733 45

This message is confidential and may contain privileged information and is protected by copyright.
If you are not the intended recipient you should not copy or disclose this message to anyone
but should kindly notify the sender and delete the message. Opinions, conclusions and other
information in this message which do not relate to the official business of Nu Instruments
Ltd shall be understood as neither given nor endorsed by it. Neither the Company nor the sender
accepts any responsibility or liability for any loss or damage arising from the presence of
any computer virus or similar harmful code contained in this email or attachment/s.  It is
your responsibility to scan this email and any attachments. The Company reserves the right
to access and disclose all messages sent over its email system.



Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message