我想使用SearchQuerySet的窄函数在drf haystack中的solr中利用fq(结果缓存并且对分数没有影响)。
我正在寻找像
这样的东西http://example.com/api/v1/location/search/?narrow_by=country:Oslo
如果此功能不可用(可能不是),实施它的最佳方式是什么。
答案 0 :(得分:0)
您是否阅读过drf-haystack上的文档?
https://drf-haystack.readthedocs.io/en/latest/07_faceting.html#narrowing
如果使用最新的v1.6.0rc3版本,则有一个mixin类,它支持分面。