--- title: Index ServiceNow knowledge blocks slug: l3uc0533 canonical_url: https://docs.coveo.com/en/l3uc0533/ collection: coveo-for-servicenow source_format: adoc --- # Index ServiceNow knowledge blocks If you're using [knowledge blocks](https://www.servicenow.com/docs/bundle/zurich-servicenow-platform/page/product/knowledge-management/concept/knowledge-blocks.html) in your ServiceNow instance, and your ServiceNow [source](https://docs.coveo.com/en/246/) is configured to [index](https://docs.coveo.com/en/204/) knowledge articles, the ServiceNow source automatically indexes the content of knowledge blocks that are included in knowledge articles. When a user performs a [query](https://docs.coveo.com/en/231/) in a Coveo [search interface](https://docs.coveo.com/en/2741/) that [matches the content](https://docs.coveo.com/en/l3uc0533#make-the-content-of-knowledge-blocks-searchable) of a knowledge block, the search results show the knowledge article that contains the knowledge block only if the user is [authorized](https://docs.coveo.com/en/2107#content-security-tab) to view the knowledge article. [Knowledge blocks are secured by user criteria](https://www.servicenow.com/docs/bundle/zurich-servicenow-platform/page/product/knowledge-management/task/create-modify-knowledge-block.html) in ServiceNow. This determines which users can read the block content within a given knowledge article. If a user doesn't have read access to a knowledge block, but is authorized to view the corresponding knowledge article, the article still appears in the search results when the query matches the content of the knowledge block. However, the knowledge block doesn't appear for the user within the article itself. > **Note** > > Refer to [Exclude knowledge blocks from Coveo search results](https://docs.coveo.com/en/l3uc0533#exclude-knowledge-blocks-from-coveo-search-results) for instructions on how to configure your ServiceNow source to not show knowledge blocks as separate results. ## Make the content of knowledge blocks searchable Knowledge block metadata must be mapped to a specific index field in your ServiceNow source in order for the content to be searchable in a Coveo-powered search interface. This mapping is automatically added when you create a new ServiceNow source. However, if you created your ServiceNow source prior to support for the automatic-mapping feature, you must manually add the mapping to your source. Perform the following steps to verify if the mapping currently exists for your ServiceNow source, and if not, add the mapping: . On the [**Sources**](https://platform.cloud.coveo.com/admin/#/orgid/content/sources/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/sources/)) page, click your ServiceNow source, and then click **Mappings** in the Action bar. . Click the **Specific** tab. . Click the `kb_knowledge` item type. . In the field list that appears, verify if the `snkbblockscontent` field mapping appears in the list. If it appears, the mapping already exists for your source. Otherwise, perform the following steps to add the mapping: ![Search-result](https://docs.coveo.com/en/assets/images/coveo-for-servicenow/block-field-map.png) .. Click **Add**, and then select **Mapping**. .. In the **Apply a Mapping on Specific Item Types of a Source** panel, under **Field**, select `snkbblockscontent`. .. Under **Apply to**, select **Specific item types**, and then select the **kb_knowledge** item type. .. Under **Rules**, enter `%[coveo_knowledge_blocks]`. .. Click **Apply mapping**. The mapping now appears in the `kb_knowledge` field list. .. Click **Save and rebuild** source. ## Exclude knowledge blocks from Coveo search results By default, a knowledge block appears as a separate Coveo search result when the query matches the content of the knowledge block. This result is in addition to the result for the corresponding knowledge article that appears if the user is [authorized](https://docs.coveo.com/en/2107#content-security-tab) to view the article. If a user selects the knowledge block result, it opens only the knowledge block content and not the article that contains the block. Moreover, while your ServiceNow source indexes the content of knowledge blocks, it doesn't index the permissions associated with the knowledge blocks. This means that if a user doesn't have access to read the knowledge block in ServiceNow, the knowledge block still appears in Coveo search results. To configure your ServiceNow source to not show knowledge blocks in Coveo search results, but still display the corresponding article, you must exclude the `kb_knowledge_block` objects from the `kb_knowledge` table in your source configuration as follows: . On the [**Sources**](https://platform.cloud.coveo.com/admin/#/orgid/content/sources/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/sources/)) page, click your ServiceNow source, and then click **Edit** in the Action bar. . Select the **Content to include** tab. . In the left pane, enter `kb_knowledge` in the search field to locate the system table in the list. . Click the `Knowledge` table to open the corresponding column list in the right pane. . Click **Query** in the column list header, and then enter the query expression `sys_class_name!=kb_knowledge_block`. . Click **Save and rebuild source**.