1
import sys, os
import lucene
from java.io import File
from org.apache.lucene.analysis.standard import StandardAnalyzer
from org.apache.lucene.index import DirectoryReader
from org.apache.lucene.queryparser.classic import QueryParser
from org.apache.lucene.document import Document, Field
from org.apache.lucene.index import IndexWriter, IndexWriterConfig
from org.apache.lucene.store import SimpleFSDirectory
from org.apache.lucene.util import Version
def index(start, no, dom):
lucene.initVM()
# join base dir and index dir
path = raw_input("Path for index: ")
index_path = File(path)
directory = SimpleFSDirectory(index_path) # the index
我一直有与SimpleFSDirectory错误,甚至当我尝试过其他的东西像目录= SimpleFSDirectory(文件(os.path.abspath则( “路径”)))SimpleFSDirectory不是蟒蛇Lucene的工作
InvalidArgsError :( '初始化',(,))