From dbec3ad9dfa4b0e6373406929770579691fa6824 Mon Sep 17 00:00:00 2001 From: Sun Junyi Date: Mon, 1 Jul 2013 11:20:56 +0800 Subject: [PATCH] add some comments --- test/test_whoosh.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_whoosh.py b/test/test_whoosh.py index 4069160..4408e9e 100644 --- a/test/test_whoosh.py +++ b/test/test_whoosh.py @@ -1,7 +1,7 @@ # -*- coding: UTF-8 -*- import sys sys.path.append("../") -from whoosh.index import create_in +from whoosh.index import create_in,open_dir from whoosh.fields import * from whoosh.qparser import QueryParser @@ -10,7 +10,8 @@ from jieba.analyse import ChineseAnalyzer analyzer = ChineseAnalyzer() schema = Schema(title=TEXT(stored=True), path=ID(stored=True), content=TEXT(stored=True, analyzer=analyzer)) -ix = create_in("tmp", schema) +ix = create_in("tmp", schema) # for create new index +#ix = open_dir("tmp") # for read only writer = ix.writer() writer.add_document(