Skip to main content
The Community Search API goes beyond simple name matching to understand context and meaning, helping users find relevant communities they might not have discovered through traditional keyword searches.

Key Features

Semantic Understanding

Find communities based on meaning and context, not just exact name matches

Advanced Filtering

Filter by categories, tags, and membership status for precise results

Relevance Scoring

Results ranked by semantic relevance combined with lexical matching

Search Filtering Options

Category Filtering

Behavior: Searches across all community categoriesUse Case: Broad discovery when category preference is unknownImplementation: Omit categoryIds parameter or pass empty array
Behavior: Limits search to specified category IDsUse Case: Focused search within known interest areasImplementation: Pass array of category IDs: categoryIds: ["cat1", "cat2"]

Tag-Based Filtering

Behavior: Includes communities regardless of tagsUse Case: Maximum coverage when tag preferences are flexibleImplementation: Omit tags parameter or pass empty array
Behavior: Filters to communities with specified tagsUse Case: Targeted search for communities with specific topics/themesImplementation: Pass array of tags: tags: ["technology", "beginner-friendly"]

Membership Status Filtering

  • ALL (Default)
  • MEMBER
  • NOT_MEMBER
Description: Include all communities regardless of user’s membership statusBest For:
  • New user onboarding
  • General community discovery
  • Exploring new interests
Example Use Cases:
  • “Show me all photography communities”
  • Public community browsers
  • Recommendation engines
// Search Options
let options = AmityCommunitySemanticSearchOptions(query: "shoes", categoryIds: nil, tags: nil, communityMembershipStatus: .all)

token = communityRepository.semanticSearchCommunities(options: options).observe({ liveCollection, _, error in
    
    let allCommunities = liveCollection.snapshots
    // ...
})

Example Use Cases & Results

Search Example: “Ice Cream”

When users search for “ice cream,” the intelligent search returns communities ranked by semantic relevance:
  • High Relevance (0.8-1.0)
  • Medium Relevance (0.5-0.7)
  • Lower Relevance (0.3-0.4)
🥇 Community: "Ice Cream Society"
📊 Score: 0.95
📝 Description: "Share your favorite frozen dessert spots and homemade recipes."
👥 Members: 2,847

🥈 Community: "Frozen Treats United"  
📊 Score: 0.89
📝 Description: "Connect with other ice cream and gelato enthusiasts."
👥 Members: 1,523

Practical Search Scenarios

Scenario: Help new users discover relevant communitiesApproach: Use membershipFilter: NOT_MEMBER with broad categoriesBenefits:
  • Exposes users to communities they haven’t joined
  • Increases community discovery and engagement
  • Provides personalized recommendations
Scenario: User wants to find specific communities they’re already inApproach: Use membershipFilter: MEMBER with specific search termsBenefits:
  • Quick access to joined communities
  • Efficient community management
  • Improved user experience
Scenario: User interested in specific topics within a categoryApproach: Combine categoryIds filtering with semantic searchBenefits:
  • Focused, relevant results
  • Reduced noise in search results
  • Better match with user intent

Limitations & Considerations

Current Limitations:
  • Search Scope: Limited to community names and descriptions only
  • Content Exclusion: Does not search within community posts or comments
  • Language Mixing: Mixed-language queries may have reduced accuracy
  • Real-time Lag: New communities may take a few moments to appear in search results