我正在使用django-oscar电子商务,支持用于干草堆搜索的嗖嗖声实施。我的商店包含近70k物品:
>>> from catalogue.models import Product
>>> Product.objects.all().count()
69084
但显然索引只包含21000个文档:
>>> from whoosh.index import open_dir
>>> from whoosh.query import Every
>>> ix = open_dir('whoosh_index')
>>> len(list(ix.searcher().documents()))
21000
>>> len(ix.searcher().search(Every('text')))
21000
您有什么想法,为什么搜索引擎只能索引部分文档(产品)?我认为将21000的一个数字编入索引并不是巧合(而不是随机数,例如24861) - 但我可能错了。任何想法,在哪里寻找这个问题的解决方案?