Open pdpinch opened 9 years ago
I tested this https://github.com/django-haystack/django-haystack/issues/824 and it works:
In [1]: from search.forms import SearchForm
In [2]: form = SearchForm(repo_slug='small', sortby='nr_views')
In [3]: res = form.search()
In [4]: len(res) # toy course
Out[4]: 18
# 2 terms have the vocabulary "color" set; the vocabulary "color" has ID=3
In [5]: missing = res.filter(_missing_='3_exact')
In [6]: len(missing)
Out[6]: 16
What's missing is how we plug this feature of Haystack to the UI: need to do some more research and tests.
The main problem I see is how to fetch the number without making additional requests to the backend
@Ferdi suggested to not put the missing number next to the Vocabulary label, but to create an additional entry in the list with term name "not tagged". this entry should eventually be styled differently.
cc @pdpinch
I updated the description to follow Giovanni's comment above, https://github.com/mitodl/lore/issues/591#issuecomment-139259659
@giocalitri did we ever do any statsd instrumentation on the "not tagged" term? What is your feeling about performance?
I put a decorator for the search API. I didn't look at the results.
As a curator, I would like an easy way to find all the learning resources that have not had any term applied in given vocabulary.