Returns the spelling suggestion found by the query. To work, you must set ``INCLUDE_SPELLING`` within your connection's settings dictionary to ``True``. Otherwise, ``None`` will be returned. This will cause the query to execute and should generally be used when
(self, preferred_query=None)
| 576 | return clone |
| 577 | |
| 578 | def spelling_suggestion(self, preferred_query=None): |
| 579 | """ |
| 580 | Returns the spelling suggestion found by the query. |
| 581 | |
| 582 | To work, you must set ``INCLUDE_SPELLING`` within your connection's |
| 583 | settings dictionary to ``True``. Otherwise, ``None`` will be returned. |
| 584 | |
| 585 | This will cause the query to execute and should generally be used when |
| 586 | presenting the data. |
| 587 | """ |
| 588 | if self.query.has_run(): |
| 589 | return self.query.get_spelling_suggestion(preferred_query) |
| 590 | else: |
| 591 | clone = self._clone() |
| 592 | return clone.query.get_spelling_suggestion(preferred_query) |
| 593 | |
| 594 | def values(self, *fields): |
| 595 | """ |
no test coverage detected