projects
/
zzz-pokedex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e3a947d
)
open_index was returning an index instead of a SpellChecker. #15
author
Eevee
<git@veekun.com>
Fri, 21 Aug 2009 04:07:06 +0000
(21:07 -0700)
committer
Eevee
<git@veekun.com>
Fri, 21 Aug 2009 04:07:06 +0000
(21:07 -0700)
pokedex/lookup.py
patch
|
blob
|
history
diff --git
a/pokedex/lookup.py
b/pokedex/lookup.py
index
f17caf7
..
5643f66
100644
(file)
--- a/
pokedex/lookup.py
+++ b/
pokedex/lookup.py
@@
-70,7
+70,9
@@
def open_index(directory=None, session=None, recreate=False):
# Already exists; should be an index!
try:
index = whoosh.index.open_dir(directory, indexname='pokedex')
# Already exists; should be an index!
try:
index = whoosh.index.open_dir(directory, indexname='pokedex')
- speller = whoosh.index.open_dir(directory, indexname='spelling')
+ spell_store = whoosh.filedb.filestore.FileStorage(directory)
+ speller = whoosh.spelling.SpellChecker(spell_store,
+ indexname='spelling')
return index, speller
except whoosh.index.EmptyIndexError as e:
# Apparently not a real index. Fall out of the if and create it
return index, speller
except whoosh.index.EmptyIndexError as e:
# Apparently not a real index. Fall out of the if and create it