1

我正在使用 django-oscar 电子商务,并以 whoosh 实现为支持进行干草堆搜索。我的商店包含近 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)并不是巧合 - 但我可能错了。任何想法,在哪里寻找这个问题的解决方案?

4

0 回答 0