Search Post
Enhancing content discovery with an intuitive approach, allowing users to explore content based on context rather than just keywords. With the semanticSearchPosts()
function, the Amity SDK provides a LiveCollection of search results that prioritize relevance to the user. By utilizing advanced context recognition, semantic search enriches the discovery experience, helping users find content they might not have initially been aware of, thereby boosting community engagement.
Here's an explanation of the function parameters:
query
: The search input.targetType
: Represents the type of target where the post was created. ie., either 'community' or 'user' feed. This parameter is optional. If it is not provided, the system will attempt to search for posts in possible targets where the user has the permission to read.targetId
: The ID of the designated target. ie.,communityId
when targetType is 'community' anduserId
when targetType is 'user'. The parameter is required iftargetType
is specified.matchingOnlyParentPost
: Excludes child posts whentrue
, and Includes child posts whenfalse
postTypes
: Filter results by types of post. Currently supportsTEXT
andIMAGE
post.
Last updated