创建索引时报错<Schema: ['content']> is not a Schema,什么原因呢?
schema = fields.Schema(content=fields.TEXT)
storage = FileStorage(standard_table_index1)
if not os.path.exists(standard_table_index1):
os.mkdir(standard_table_index1)
ix = storage.create_index(schema)
else:
ix = storage.open_index()
print("新增索引")
创建索引时报错<Schema: ['content']> is not a Schema,什么原因呢?
schema = fields.Schema(content=fields.TEXT)
storage = FileStorage(standard_table_index1) if not os.path.exists(standard_table_index1): os.mkdir(standard_table_index1) ix = storage.create_index(schema) else: ix = storage.open_index() print("新增索引")