Skip to content

Data Type and Entity

This document introduces Data Type and Entity, which are data structures managed as search targets in Sitecore Search. By learning about this structure, you can understand what kind of data can be handled by default and how to extend it for use.

What is a Data Type?

A Data Type defines the structure of data when saved by Sitecore Search’s crawler or API integration. The following Data Types are provided:

  • Integer
  • Double
  • Array of Integer
  • Float
  • Array of Float
  • Boolean
  • String
  • Array of strings
  • GEO
  • Object
  • Array of objects
  • Timestamp

Data Type affects which features this attribute can be used for. For example, integer attributes cannot be used for personalization. Similarly, object attributes cannot be used for facets, filters, personalization, or sorting. Options that cannot be used are grayed out in Use For Features.

What is an Entity?

An Entity determines the structure of the content that Sitecore Search searches. The structure of an Entity consists of a list of attributes, each determined by a Data Type.

To add an Entity, open Domain Settings - General Settings, click on Entities, and you will see the following screen.

Entities

Entity Template

Sitecore Search provides several Entity templates, and it is also possible to customize Entities. Here, we will review the standard Entity templates provided by Sitecore Search.

Content

This is a standard template used by Sitecore Search for crawling website content. The template name is Content Search Preconfig Template. The following attributes are provided when creating Content.

Display NameAttribute NameData Type
BreadcrumbsbreadcrumbsArray of strings
Content TypetypeString
DescriptiondescriptionString
Document Activenessis_activeBoolean
IdidString
Image urlimage_urlString
Name/TitlenameString
Questions and Answeringrfk_questionsArray of composites
Review ratingreview_ratingFloat
Sourcerfk_sourceComposite
Statsrfk_statsComposite
TagstagsArray of strings
UrlurlString

Product

The name of this template is Base Attributes Template for Product. It includes attributes that can be used for e-commerce sites, allowing for the handling of a large amount of data.

Display NameAttribute NameData Type
Add to cartadd_to_cartString
Additional image SKU urlsadditional_sku_image_urlsString
Additional image urlsadditional_image_urlsString
All category namesall_category_namesArray of strings
BrandbrandString
Brand codebrand_codeString
BreadcrumbsbreadcrumbsString
Bundle SKUsbundle_skusString
Categoryall_category_idsArray of strings
Category breadcrumbscategory_breadcrumbsString
Category idscategory_idsArray of strings
Category namescategory_namesArray of strings
ColorcolorString
Color display namecolor_display_nameString
Color rgb valuecolor_rgbString
Customer Category IdentifiersccidsArray of strings
DescriptiondescriptionString
Document Activenessis_activeBoolean
Expiration Dateexpiration_dateString
Final Pricefinal_priceFloat
Hashed image urlimage_idString
IdidString
Image urlimage_urlString
Is in stockis_in_stockBoolean
MarginmarginFloat
Mobile SKU image urlmobile_sku_image_urlString
Mobile SKU urlmobile_sku_urlString
Mobile image urlmobile_image_urlString
Mobile product urlmobile_product_urlString
NamenameString
On saleon_saleBoolean
PricepriceFloat
Productproduct_groupString
Product lookup fieldprod_lookupArray of strings
Product typeproduct_typeString
Product urlproduct_urlString
Quick lookquick_lookString
Quick viewquick_viewString
RFK tagsrfk_tagsObject
Rank By 1rankby1Float
Rank By 2rankby2Float
Release Daterelease_dateString
Review Countreview_countInteger
Review linkreview_linkString
Review ratingreview_ratingFloat
SKUskuString
SKU descriptionsku_descriptionString
SKU namesku_nameString
Save offsave_offFloat
Search keywordssearch_keywordsString
Set SKUs keywordsset_skusString
Short_descriptionshort_descriptionString
Sku Lookupsku_lookupArray of strings
Sku image urlsku_image_urlString
Sku sequencesku_sequenceInteger
Sku urlsku_urlString
Sourcerfk_sourceComposite
Statsrfk_statsComposite
Stock quantitystock_quantityInteger
Stock unitstock_unitString
prod_url_keyprod_url_keyString
sku_url_keysku_url_keyString
swatchswatchArray of objects

Category

The name of this template is Base Attributes Template for Category. It provides basic attributes for using categories.

Display NameAttribute NameData Type
All Category Idsall_idsArray of strings
All Category Namesall_namesArray of strings
All Category URL Keysall_url_keysArray of strings
All Category URL Pathsall_url_pathsArray of strings
All Customer Category Identifiersall_ccidsArray of strings
Category BreadcrumbsbreadcrumbArray of strings
Category NamenameString
Category Primaryis_primaryBoolean
Category Primary URLurl_pathString
Category Primary Url Keyurl_keyString
Customer Category IdentifierccidString
Document Activenessis_activeBoolean
IdidString
Parent Category Idsparent_idsArray of strings
Parent Customer Category Identifiersparent_ccidsArray of strings
Sourcerfk_sourceComposite
Statsrfk_statsComposite

Store

This template is named Store.

Display NameAttribute NameData Type
Citizenship requiredcitizenship_requiredString
Group Idgroup_idString
IdidString
Job number of positions availablejob_numberString
Job shiftjob_shiftString
Location in lat long coordinateslocationGEO
Security clearance requiredsecurity_clearance_requiredString
Used for searching addressaddressString

Summary

This time, we focused on Data Type and Entity. For basic site search, it is sufficient to extend the Content Entity.

References