Before you start
- A Pro plan or higher, and permission to edit sources in the knowledge base.
- Your forum’s address, for example
https://community.example.com. - For private categories only: a Discourse API key, created in your forum’s admin area. A public forum needs no key.
Set up
Choose Discourse
Open your knowledge base, go to Sources, click Add source and choose Discourse. Give the source a name.
Options
| Option | Default | What it does |
|---|---|---|
| Base URL | — | Required. Your forum’s address. |
| API key | Empty | Needed only for private categories. |
| API username | system | The Discourse user the key was created for. Discourse refuses a key used under any other name. On the Configuration tab only. |
| Categories | Empty | Category slugs, comma-separated. Empty indexes every topic the forum lists. |
| Tags | Empty | Keeps only topics with at least one of these tags. |
| Solved topics only | Off | Keeps only topics with an accepted answer. |
What gets indexed
- One document per topic, titled with the topic title.
- The opening post comes first, then the accepted answer (if there is one), then every other reply under its author’s name.
- Every reply is read, however long the topic.
- The topic’s tags and category are included.
Sync
Discourse re-syncs every 10 minutes. Click Sync Now on the source page to sync right away.Troubleshooting
- Private topics are missing. Add an API key. If you already did, set API username to the user the key was created for.
- A topic is missing. Open the source’s Sync history tab. Topics the forum refused (
403,404or410) are listed there. The rest of the forum still syncs. - The sync fails with a URL and a status. Discourse refused that request. On a category, a
403or404usually means the key cannot read it or the slug is wrong. - The sync fails on a very large forum. A single topic list is read up to 500 pages. Name Categories so each one is read separately.
- Solved topics only indexed nothing. Your forum does not report accepted answers. Turn the switch off and narrow by Categories instead.