Pushes existing facet choices into the search.
(self, query)
| 456 | return clone |
| 457 | |
| 458 | def narrow(self, query): |
| 459 | """Pushes existing facet choices into the search.""" |
| 460 | |
| 461 | if isinstance(query, SQ): |
| 462 | # produce query string using empty query of the same class |
| 463 | empty_query = self.query._clone() |
| 464 | empty_query._reset() |
| 465 | query = query.as_query_string(empty_query.build_query_fragment) |
| 466 | |
| 467 | clone = self._clone() |
| 468 | clone.query.add_narrow_query(query) |
| 469 | return clone |
| 470 | |
| 471 | def raw_search(self, query_string, **kwargs): |
| 472 | """Passes a raw query directly to the backend.""" |