If I understand the question correctly, the following is true:
* You're using Whoosh with Django
* Things that you add through the Django admin show up in searches
* Data you imported through some means other than the Django ORM (ie,
using SQL statements directly) aren't showing up in searches
While I haven't used Django with Whoosh specifically, [assuming the
above is true] the problem is that the "old" resources aren't getting
included in the Whoosh index. This points out that:
* Whoosh uses an index separate from Django's (which is why you're
using Whoosh in the first place, I suppose)
* Things need to be manually added to that index
In the code you provided the update_index function is responsible for
adding (or updating) a single document to the index. But the
following line:
signals.post_save.connect(update_index, sender= Descriptor)
means that this code only gets called when you save something through
the Django ORM. Since you didn't use the Django ORM (admin) to add
the old resources, they're never indexed. You'll need to write a
script to add the resources to the index. Something like:
for obj in MyModel.objects.all():
update_index(None, obj, False)
[this is total psuedo code]
Hope that helps,
Nathan