Hi,
as as I understand, whoosh.index.version_in(<Directory>) returns the
Whoosh's version and the format version
of an index in <Directory>.
Unfortunately this fails for me (or what am I missing?)
#!/usr/bin/python3
import re
import whoosh.index
IndexDir= '/home/jarausch/Bib_NDev/Wh_Index'
if whoosh.index.exists_in(IndexDir) :
(release_version_in,format_version_in)=
whoosh.index.version_in(IndexDir)
"""
Traceback (most recent call last):
File "Index_Version.py", line 9, in <module>
(release_version_in,format_version_in)=
whoosh.index.version_in(IndexDir)
File "/usr/lib64/python3.2/site-packages/whoosh/index.py", line
181, in version_in
return version(storage, indexname=indexname)
File "/usr/lib64/python3.2/site-packages/whoosh/index.py", line
209, in version
return (ix.release, ix.version)
AttributeError: 'FileIndex' object has no attribute 'release'
"""
print("{0}\t\t{1}".format(release_version_in,format_version_in))
else :
print("No (valid) index in {}".format(IndexDir))
This is with
changeset: 1320:d9d9aa561d1f
tag: tip
user: Matt Chaput <
ma...@whoosh.ca>
date: Fri Sep 14 15:05:05 2012 -0400
Many thanks for a hint,
Helmut.