Get text score from text query
(self)
| 318 | pass |
| 319 | |
| 320 | def get_text_score(self): |
| 321 | """ |
| 322 | Get text score from text query |
| 323 | """ |
| 324 | |
| 325 | if "_text_score" not in self._data: |
| 326 | raise InvalidDocumentError( |
| 327 | "This document is not originally built from a text query (or text_score was not set on search_text() call)" |
| 328 | ) |
| 329 | |
| 330 | return self._data["_text_score"] |
| 331 | |
| 332 | def to_mongo(self, use_db_field=True, fields=None): |
| 333 | """ |