himanshu219
himanshu219

Reputation: 664

How to use django-haystack SearchQueryset's narrow functionality in drf-haystack?

I want to use SearchQuerySet's narrow function to take advantage of fq(result caching and no impact on score) in solr in drf haystack.

I am looking for something like

http://example.com/api/v1/location/search/?narrow_by=country:Oslo

If this feature is not available(which probably isn't) what is the best way to implement it.

Upvotes: 0

Views: 432

Answers (1)

rhblind
rhblind

Reputation: 126

Have you read the docs on drf-haystack?

https://drf-haystack.readthedocs.io/en/latest/07_faceting.html#narrowing

If using the latest v1.6.0rc3 version, there is a mixin class which provides support for faceting.

Upvotes: 0

Related Questions