robinne
unread,Jul 30, 2010, 9:19:52 PM7/30/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Djapian Users
I have a djapian search based on the tutorial that pulls back data
from one model. How do I limit results based on date being null or not
null (such as DeletedDate). When I delete a record I set
DeletedDate=now. I do not want these records returned in my results so
I need to filter after the search occurs. I've tried several things
with no success. Here is what I think it would be, but I get an error.
I don't know if I need the field DeletedDate in the ProductIndexer,
just guessing.
Class...
class ProductIndexer(Indexer):
fields = ['Description', 'Keywords', 'Title','DeletedDate']
space.add_index(Product, ProductIndexer, attach_as='indexer')
View...
...
results = Product.indexer.search(query).prefetch()
#results = results.filter(DeletedDate__isnull=True) #error Unknown
field 'DeletedDate__isnull'
...