whoosh-community / whoosh

Whoosh is a fast, featureful full-text indexing and searching library implemented in pure Python.
Other
245 stars 37 forks source link

Filtering Raising AttributeError only sometimes #563

Open akeahey opened 4 years ago

akeahey commented 4 years ago

I am trying to apply filter on whoosh results. When I apply filter without a python function, I get results. However, when I put filter in a python function, I get 'AttributeError: 'Term' object has no attribute 'Term'. Please see the gist with example here: https://gist.github.com/akeahey/b6713a32cdff0ca2a58b63fdceab99be

beatobongco commented 4 years ago

You are shadowing query

Use a different variable name for your QueryParser

image