Use basic tags to get attributes from one entity

You can use basic tags to configure how you want to populate an index document to create a search experience in Sitecore Search. Generally, if the default tags that Sitecore Search creates are not enough, you can define basic tags.

Note

If you need to define a mapping between attributes for Search to evaluate based on some common attribute and then match, configure tags through aggregation.

This topic shows you how to create a basic tag in the following scenario:

  • You have a website that hosts blogs, among other things.

  • Some blogs are written by internal writers, and some by external freelancers. Both types of blogs have the same attributes but require different attribute extraction logic.

  • In your implementation, you have an entity called Blog.

  • You want to configure this search experience: When visitors search, they have a unified search experience and they see no difference between internal and external blogs.

To support this experience, you'll need the index documents for internal and external blogs to have the same attributes. To get this, configure two basic tags under the Blog entity. Use one tag to create index documents from blogs created by internal writers and use the other tag to create index documents from blogs created by external writers.

To configure a basic tag:

  1. Log in to the Customer Engagement Console (CEC), click Sources, and select the source you created.

  2. On the Source Settings page, next to Document Extractors, click edit .

  3. At the bottom of the Tags Definition page, to add a tag, click Add Tag .

  4. To associate the tag with an entity, in the Entity drop-down menu, click an entity. When you associate a tag with an entity, all attributes belonging to that entity become available for extraction.

    In this example, select the Blog entity.

  5. To configure a basic tag, in the From drop-down menu, click Tags.

  6. In the Tags field, enter a name for the tag.

    Note

    Name the tag so that any user can understand the tag's purpose just by looking at its name. This is to avoid confusion because, in the document extractor, you select from a list of tag names and then configure extraction logic for that tag.

    In this example, enter internal blogs and external blogs. You do this because you want to create two distinct tags associated with one entity.

  7. Click Save.

After you configure a tag, in the document extractor for the source, select the tag you just created and extract attributes according to your use case.

In this example, for the internal blogs , use logic that supports the extraction of internal blogs. For the external blogs tag, use logic that supports the extraction of external blogs.

Do you have some feedback for us?

If you have suggestions for improving this article,