django - haystack: How to limit SearchQuerySet to a single SearchIndex? -
context:
searchindex
analogous django's model
. tied single model via get_model
.
searchqueryset
analogous django's queryset
(except way of obtaining instance).
haystack_connections
analogous django's databases
.
one not apparent difference performing searchqueryset
operations uses searchindex
subclasses have.
how perform operations on single searchindex (for single model) only? connections don't seem meant this.
searchqueryset.models
answer, buried deep in docs.
add .models(djangomodel1, djangomodel2)
searchqueryset calls, models returned chosen searchindex
es' get_model
.
Comments
Post a Comment