1. Matt Chaput
  2. whoosh
  3. Issues
Issue #316 invalid

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

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/searching.py", line 785, in search
    self.search_with_collector(q, c)
  File "build/bdist.macosx-10.8-intel/egg/whoosh/searching.py", line 818, in search_with_collector
    collector.run()
  File "build/bdist.macosx-10.8-intel/egg/whoosh/collectors.py", line 143, in run
    self.collect_matches()
  File "build/bdist.macosx-10.8-intel/egg/whoosh/collectors.py", line 213, in collect_matches
    for sub_docnum in self.matches():
  File "build/bdist.macosx-10.8-intel/egg/whoosh/collectors.py", line 391, in matches
    self.matcher = matcher = matcher.replace(minscore or 0)
  File "build/bdist.macosx-10.8-intel/egg/whoosh/matching/binary.py", line 442, in replace
    a_max = a.max_quality()
  File "build/bdist.macosx-10.8-intel/egg/whoosh/matching/mcore.py", 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