Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 432 Bytes

misc_usage_examples.rst

File metadata and controls

18 lines (14 loc) · 432 Bytes

Various handy helpers

More like this

To get more-like-this results on a random registered model, do as follows:

from django_elasticsearch_dsl_drf.helpers import more_like_this
from books.models import Book
book = Book.objects.first()
similar_books = more_like_this(
    book,
    ['title', 'description', 'summary']
)