Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facet query not working #100

Open
chirag7jain opened this issue May 2, 2017 · 4 comments
Open

Facet query not working #100

chirag7jain opened this issue May 2, 2017 · 4 comments

Comments

@chirag7jain
Copy link

chirag7jain commented May 2, 2017

I am unable to use facets when trying narrow urls.

Default search page with no query works and it displays facets options but facet queries via narrow url don't work

django-haystack -2.60
drf-haystack==1.6.1

@bentappin
Copy link

@chirag7jain I'm having the same issue. Did you manage to figure out what the problem was?

@bentappin
Copy link

If anyone else ends up here: I'm pretty sure I solved this by not using FacetCharField() but CharField(faceted=True) instead.

@chirag7jain
Copy link
Author

@vonorm no luck

@gulci
Copy link

gulci commented Jun 3, 2019

Leaving an answer here because this same thing happened to me.

In the documentation that walks you through setting up your ViewSet, it mentions HaystackFacetFilter:

facet_filter_backends = [HaystackFacetFilter]   # This is the default facet filter, and
                                                    # can be left out.

That comment doesn't seem to be true. If you leave that out, your facet filters won't work. You have to add HaystackFacetFilter. Adding that fixed this issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants