RichResult
- class RichResult(page=<factory>, snippet=<factory>, tokens=<factory>, semantics=<factory>, profile=None, targeting=None, history=None, signals=None, vectors=None, extra=<factory>, present_fields=<factory>)
Bases:
objectOne losslessly represented result from Rich Search.
- Parameters:
page (Dict[str, Any] | None)
snippet (Dict[str, Any] | None)
tokens (Dict[str, Any] | None)
semantics (Dict[str, Any] | None)
profile (Dict[str, Any] | None)
targeting (Dict[str, Any] | None)
history (Dict[str, Any] | None)
signals (Dict[str, Any] | None)
vectors (Dict[str, Any] | None)
extra (Dict[str, Any])
present_fields (Set[str])
- page: Dict[str, Any] | None
- snippet: Dict[str, Any] | None
- tokens: Dict[str, Any] | None
- semantics: Dict[str, Any] | None
- profile: Dict[str, Any] | None = None
- targeting: Dict[str, Any] | None = None
- history: Dict[str, Any] | None = None
- signals: Dict[str, Any] | None = None
- vectors: Dict[str, Any] | None = None
- extra: Dict[str, Any]
- present_fields: Set[str]
- property similarity: float | None
Return the semantic similarity score.
- Returns:
Similarity score when supplied by the API.
- classmethod from_dict(data)
Create a rich result without discarding unknown response fields.
- Parameters:
data (Dict[str, Any]) – Rich Search result payload.
- Returns:
Parsed rich result.
- Return type:
- to_dict()
Convert the rich result to its lossless dictionary representation.
- Returns:
Rich Search result payload.
- Parameters:
self (RichResult)
- Return type:
Dict[str, Any]