Delete all indices in Lucene.net

前端 未结 4 958
栀梦
栀梦 2021-01-18 02:50

I want to delete all the previously created indices. I am using Lucene.net.

I tried the following:

Term term = new Term         


        
4条回答
  •  死守一世寂寞
    2021-01-18 03:36

    The best way to delete an index is to wipe the filesystem directory. However, if you wan't to regenerate the index, the easiest way is to open a new indexwriter with the create parameter as true. It will start a new index deleting the contents of the existing one.

提交回复
热议问题