문제

I expect to get list of Article objects when I call SearchQuerySet().more_like_this(an_article)

However it returns objects of other classes as well.

What could I possibly miss here?

도움이 되었습니까?

해결책

I've not tried this yet myself but you should be able to restrict it to certain models like this.

SearchQuerySet().models(Article).more_like_this(an_article)

http://django-haystack.readthedocs.org/en/latest/searchqueryset_api.html#models

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top