Intelligent Search - Community

Introduction

The Intelligent Search Community API allows users to search for communities with advanced filtering options. The search covers all communities across categories and tags. However, you can refine the results by applying specific filters such as category IDs, tags, or membership status.

Category Filtering

By default, the search will include communities from all categories. However, you can narrow the search scope to specific categories by specifying categoryIds array.

Tag Filtering

By default, the search will include communities regardless of tags. However, you can narrow the search scope to specific tags by specifying tags array.

Membership Status Filtering

You can choose to narrow the search by membership status option

ALL - Include communities regardless of membership status (default option)

MEMBER - Include only communities that the user is a member of.

NOT_MEMBER - Include only communities that the user is not a member of.

Example Use Cases

Search for Communities

When the user searches for "ice cream," the output may include communities ranked by their relevance score. For example:

Community displayname 1st: "I love ice cream."
Community displayname 2nd: "Ice cream is my favorite dessert."
Community displayname 3rd: "Nothing beats a scoop of ice cream on a hot day!"
Community displayname 4th: "I enjoy trying different types of pastries."
Community displayname 5th: "Cooking is a great way to relax after a long day."

Search Result Score

This API returns a score for each item, ranging from 0 to 1. The score is calculated based on two factors—lexical and semantic—that are weighted differently.

  • Lexical score: contributes 30% of the total score. If a community contains displayname or description that matches the search term, it will receive a higher lexical score.

  • Semantic score: contributes 70% of the total score. The more relevant a community is to the search term in meaning, the higher its semantic score will be.

Filtering Results by Minimum Score

All matched items are included by default, even with a low score. However, you can adjust the minimum score filter based on the content and your specific use case. Any item with a score lower than the specified threshold will be excluded from the results.

Example search query - "Red Fruits"

  • Low Threshold (0.2): This shows various fruits, even those loosely related to the search term. For example, results could include apples, strawberries, and even unrelated fruits like bananas (not red).

  • High Threshold (0.8): This filters results to show only highly relevant matches, such as cherries and raspberries while excluding unrelated fruits like bananas or green apples.

The API is available at Network Settings - Semantic Search (requires admin permission).

Limitations

  • Recent user activity is not considered when determining the relevance of search results.

  • Real-time search suggestions while typing are not supported across all APIs.

Last updated