AttributeError: 'NoneType' object has no attribute 'block_quality'

Issue #316 invalid
Stephane Boisson
created an issue

With the latest Whoosh 2.5.0 from source.

When I am using a And term which include a NumericRange I get the following error:

  File "build/bdist.macosx-10.8-intel/egg/whoosh/", line 785, in search
    self.search_with_collector(q, c)
  File "build/bdist.macosx-10.8-intel/egg/whoosh/", line 818, in search_with_collector
  File "build/bdist.macosx-10.8-intel/egg/whoosh/", line 143, in run
  File "build/bdist.macosx-10.8-intel/egg/whoosh/", line 213, in collect_matches
    for sub_docnum in self.matches():
  File "build/bdist.macosx-10.8-intel/egg/whoosh/", line 391, in matches
    self.matcher = matcher = matcher.replace(minscore or 0)
  File "build/bdist.macosx-10.8-intel/egg/whoosh/matching/", line 442, in replace
    a_max = a.max_quality()
  File "build/bdist.macosx-10.8-intel/egg/whoosh/matching/", line 473, in max_quality
    return self._scorer.block_quality(self)
AttributeError: 'NoneType' object has no attribute 'block_quality'

It seems to be caused by a IntersectionMatcher(<ListMatcher>, <whoosh.matching.combo.PreloadedUnionMatcher object>) which doesn't have a matcher set..

Going to try with a filter to see if that change anything..

Best regards, St├ęphane

Comments (4)

  1. Log in to comment