I have a Djapian Indexer something like this..
class SomeModelIndexer(Indexer):
fields = ["body"]
tags = [('title', 'title', 2),
('tag', 'strtags')]
space.add_index(SomeModel, SomeModelIndexer, attach_as="indexer")
This allows me to search SomeModels by tag with a search like "tag:sausages" which would find any SomeModels tagged with "sausages". (strtags is a @property decorated function on SomeModel).
In [1]: from project.someapp.models import SomeModel
In [2]: from project.someapp import index
In [3]: SomeModel.indexer.search("tag:sausages").count()
Out[3]: 2L
So that works, but I also have a CompositeIndexer which includes the SomeModelIndexer but searching that indexer for "tag:sausages" returns zero results.
composite_index = CompositeIndexer(SomeModel.indexer, AnotherModel.indexer)
In [4]: index.composite_index.search("tag:sausages").count()
Out[4]: 0L
Any clues on how I might get that to work?