-from lucene import SimpleFSDirectory, IndexWriter, IndexWriterConfig, CheckIndex, \
+from lucene import SimpleFSDirectory, NIOFSDirectory, IndexWriter, IndexWriterConfig, CheckIndex, \
File, Field, Integer, \
NumericField, Version, Document, JavaError, IndexSearcher, \
QueryParser, PerFieldAnalyzerWrapper, \
File, Field, Integer, \
NumericField, Version, Document, JavaError, IndexSearcher, \
QueryParser, PerFieldAnalyzerWrapper, \
q = NumericRangeQuery.newIntRange("tag_id", 0, Integer.MAX_VALUE, True, True)
self.index.deleteDocuments(q)
q = NumericRangeQuery.newIntRange("tag_id", 0, Integer.MAX_VALUE, True, True)
self.index.deleteDocuments(q)
doc = Document()
doc.add(NumericField("tag_id", Field.Store.YES, True).setIntValue(int(tag.id)))
doc.add(Field("tag_name", tag.name, Field.Store.NO, Field.Index.ANALYZED))
doc = Document()
doc.add(NumericField("tag_id", Field.Store.YES, True).setIntValue(int(tag.id)))
doc.add(Field("tag_name", tag.name, Field.Store.NO, Field.Index.ANALYZED))