Issue #240 resolved

whoosh.matching.core.ReadTooFar traceback?

Priit Laes
created an issue

I'm getting following traceback:

{{{ Traceback (most recent call last): File "searcher.py", line 21, in <module> schema=ix.schema).parse(u"DVD"), 1) File "whoosh/src/whoosh/searching.py", line 562, in search_page results = self.search(query, limit=pagenum * pagelen, **kwargs) File "whoosh/src/whoosh/searching.py", line 690, in search return collector.search(self, q, allow=filter, restrict=mask) File "whoosh/src/whoosh/searching.py", line 986, in search self.add_matches(q, offset, scorefn) File "whoosh/src/whoosh/searching.py", line 1000, in add_matches for score, offsetid in self.pull_matches(q, offset, scorefn): File "whoosh/src/whoosh/searching.py", line 1107, in pull_matches checkquality = matcher.next() File "whoosh/src/whoosh/matching/binary.py", line 652, in next ar = self.a.next() File "whoosh/src/whoosh/matching/binary.py", line 200, in next raise core.ReadTooFar whoosh.matching.core.ReadTooFar }}}

with follwoing search script: {{{

!python

from whoosh import index, query from whoosh.fields import SchemaClass, NUMERIC, TEXT, ID from whoosh.qparser import MultifieldParser

class KomasuSchema(SchemaClass): id = NUMERIC(stored=True) # product id code = ID(stored=True, unique=True) # product code category = NUMERIC(stored=True) # product group name = TEXT # product name info = TEXT # short description desc = TEXT # long description brand = TEXT(stored=True) # brand price = NUMERIC(stored=True) # price stock = NUMERIC(stored=True) # Number of items in stock

ix = index.open_dir('/tmp/_whoosh')

with ix.searcher() as searcher: result = searcher.search_page(query.Not(query.Term("stock", 0)) & \ MultifieldParser(('name', 'info', 'desc'), \ schema=ix.schema).parse(u"DVD"), 1) print result }}}

Is it OK, if I'll provide the url to search index tarball privately? (It's 5.4MB packed, 21MB unpacked)

Comments (2)

  1. Log in to comment