pub struct CommentSearchHit {
pub comment: CommentResponse,
pub post_title: String,
pub similarity: f64,
}Expand description
A comment that a semantic search found: the comment, the title of
the post it is under, and how close it came to the query.
Fields§
§comment: CommentResponseThe comment itself. Its post_id is the post it is under; read
the thread with get_content on either id.
post_title: StringTitle of the post the comment is under
similarity: f64Cosine similarity between the query and the comment, from the search’s floor (0.5) up to 1. Comparable with the similarities that ordered the posts in the same response, which are not sent.
Trait Implementations§
Source§impl Clone for CommentSearchHit
impl Clone for CommentSearchHit
Source§impl Debug for CommentSearchHit
impl Debug for CommentSearchHit
Source§impl<'de> Deserialize<'de> for CommentSearchHit
impl<'de> Deserialize<'de> for CommentSearchHit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CommentSearchHit
impl RefUnwindSafe for CommentSearchHit
impl Send for CommentSearchHit
impl Sync for CommentSearchHit
impl Unpin for CommentSearchHit
impl UnsafeUnpin for CommentSearchHit
impl UnwindSafe for CommentSearchHit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more