pombreda / djapian

Automatically exported from code.google.com/p/djapian
Other
0 stars 0 forks source link

CompositeIndexer not returning tags #123

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using the CompositeIndexer tags in the Hit object are not populated.

I've found a way to resolve this by changing lines 233 and 234 of resultset.py 
from:

tags = dict([(tag.prefix, tag.extract(doc))\
               for tag in self._indexer.tags])

to:

tags = dict([(tag.prefix, tag.extract(doc))\
               for tag in model.indexer.tags])

Original issue reported on code.google.com by michael....@gmail.com on 17 Jan 2011 at 2:35

GoogleCodeExporter commented 9 years ago
We can't use 'model.indexer' here because 1) 'indexer' is an arbitrary name, 
and 2) there could be more then single one indexer for the same model.

In r381 there's an initial fix for this issue. It might be changed in favor of 
subclassing ResultSet in future.

Original comment by esizi...@gmail.com on 21 Oct 2011 at 7:51