changeset 1540:79f67662d3e7

delete next_id
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 13 Sep 2020 15:32:51 -0600
parents c27dc6af87ca
children dc23c96f5021
files src/luan/modules/lucene/LuceneIndex.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
diff -r c27dc6af87ca -r 79f67662d3e7 src/luan/modules/lucene/LuceneIndex.java
--- a/src/luan/modules/lucene/LuceneIndex.java	Sun Sep 06 11:35:30 2020 -0600
+++ b/src/luan/modules/lucene/LuceneIndex.java	Sun Sep 13 15:32:51 2020 -0600
@@ -368,6 +368,9 @@
 
 	private void initId() throws IOException {
 //		TopDocs td = searcher.search(new TermQuery(new Term("type","next_id")),1);
+		writer.deleteDocuments(new TermQuery(new Term("type","next_id")));
+		writer.commit();
+
 		TopDocs td = searcher.search(new MatchAllDocsQuery(),1,new Sort(ID_DESC_SORT));
 		switch(td.scoreDocs.length) {
 		case 0: