(self, using=DEFAULT_ALIAS)
| 471 | """ |
| 472 | |
| 473 | def __init__(self, using=DEFAULT_ALIAS): |
| 474 | self.query_filter = SearchNode() |
| 475 | self.order_by = [] |
| 476 | self.models = set() |
| 477 | self.boost = {} |
| 478 | self.start_offset = 0 |
| 479 | self.end_offset = None |
| 480 | self.highlight = False |
| 481 | self.facets = {} |
| 482 | self.date_facets = {} |
| 483 | self.query_facets = [] |
| 484 | self.narrow_queries = set() |
| 485 | #: If defined, fields should be a list of field names - no other values |
| 486 | #: will be retrieved so the caller must be careful to include django_ct |
| 487 | #: and django_id when using code which expects those to be included in |
| 488 | #: the results |
| 489 | self.fields = [] |
| 490 | # Geospatial-related information |
| 491 | self.within = {} |
| 492 | self.dwithin = {} |
| 493 | self.distance_point = {} |
| 494 | # Internal. |
| 495 | self._raw_query = None |
| 496 | self._raw_query_params = {} |
| 497 | self._more_like_this = False |
| 498 | self._mlt_instance = None |
| 499 | self._results = None |
| 500 | self._hit_count = None |
| 501 | self._facet_counts = None |
| 502 | self._stats = None |
| 503 | self._spelling_suggestion = SPELLING_SUGGESTION_HAS_NOT_RUN |
| 504 | self.spelling_query = None |
| 505 | self.result_class = SearchResult |
| 506 | self.stats = {} |
| 507 | from haystack import connections |
| 508 | |
| 509 | self._using = using |
| 510 | self.backend = connections[self._using].get_backend() |
| 511 | |
| 512 | def __str__(self): |
| 513 | return self.build_query() |
nothing calls this directly
no test coverage detected