whoosh-community / whoosh

Whoosh is a fast, featureful full-text indexing and searching library implemented in pure Python.
Other
245 stars 37 forks source link

<Schema: ['content']> is not a Schema #577

Open liyanfu520 opened 1 year ago

liyanfu520 commented 1 year ago

创建索引时报错<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("新增索引")