1. Matt Chaput
  2. whoosh
  3. Issues
Issue #193 new

StructFile('_foo_4.dag') does not seem to be a graph file

Thomas Waldmann
created an issue

I wanted to try query correction, but this happened:

{{{ File "/home/tw/moin-2.0/MoinMoin/apps/frontend/views.py", line 155, in search

with flaskg.storage.searcher(all_revs=history) as searcher:

File "/home/tw/moin-2.0/MoinMoin/storage/backends/indexing.py", line 128, in searcher

return self._index.searcher(all_revs=all_revs)

File "/home/tw/moin-2.0/MoinMoin/storage/backends/indexing.py", line 379, in searcher

return ix.searcher()

File "/home/tw/moin-2.0/env/lib/python2.6/site-packages/whoosh/index.py", line 324, in searcher

return Searcher(self.reader(), fromindex=self, **kwargs)

File "/home/tw/moin-2.0/env/lib/python2.6/site-packages/whoosh/filedb/fileindex.py", line 347, in reader

info.generation, reuse=reuse)

File "/home/tw/moin-2.0/env/lib/python2.6/site-packages/whoosh/filedb/fileindex.py", line 334, in _reader

readers = [segreader(segment) for segment in segments]

File "/home/tw/moin-2.0/env/lib/python2.6/site-packages/whoosh/filedb/fileindex.py", line 323, in segreader

return SegmentReader(storage, schema, segment)

File "/home/tw/moin-2.0/env/lib/python2.6/site-packages/whoosh/filedb/filereading.py", line 93, in __init__

self.dawg = DiskNode.load(dawgfile, expand=False)

File "/home/tw/moin-2.0/env/lib/python2.6/site-packages/whoosh/support/dawg.py", line 427, in load

raise Exception("%r does not seem to be a graph file" % dbfile)

Exception: StructFile('_latest_revisions_index_4.dag') does not seem to be a graph file

}}}

This is the schema: {{{ common_fields = dict( wikiname=ID(stored=True), name=TEXT(stored=True, multitoken_query="and", analyzer=item_name_analyzer(), field_boost=2.0, spelling=True), name_exact=ID(field_boost=3.0, spelling=True), rev_no=NUMERIC(stored=True), mtime=DATETIME(stored=True), contenttype=TEXT(stored=True, multitoken_query="and", analyzer=MimeTokenizer()), tags=ID(stored=True), language=ID(stored=True), userid=ID(stored=True), address=ID(stored=True), hostname=ID(stored=True), size=NUMERIC(stored=True), action=ID(stored=True), comment=TEXT(stored=True, multitoken_query="and"), content=TEXT(stored=True, multitoken_query="and", spelling=True), )

    self.latest_revisions_schema = Schema(uuid=ID(unique=True, stored=True),
                                          itemlinks=ID(stored=True),
                                          itemtransclusions=ID(stored=True),
                                          acl=TEXT(analyzer=AclTokenizer(self._cfg), multitoken_query="and", stored=True),
                                          **common_fields)

}}}

I have done a full index rebuild after adding spelling=True flags.

But the file it complains about has 0 bytes.

Do you see what's wrong?

Comments (1)

  1. Log in to comment