(self)
| 77 | super().__init__(*args, **kwargs) |
| 78 | |
| 79 | def search(self): |
| 80 | sqs = super().search() |
| 81 | |
| 82 | # We need to process each facet to ensure that the field name and the |
| 83 | # value are quoted correctly and separately: |
| 84 | for facet in self.selected_facets: |
| 85 | if ":" not in facet: |
| 86 | continue |
| 87 | |
| 88 | field, value = facet.split(":", 1) |
| 89 | |
| 90 | if value: |
| 91 | sqs = sqs.narrow('%s:"%s"' % (field, sqs.query.clean(value))) |
| 92 | |
| 93 | return sqs |
| 94 | |
| 95 | |
| 96 | class ModelSearchForm(SearchForm): |