-
Notifications
You must be signed in to change notification settings - Fork 6
Index Definition
Dmitry Harnitski edited this page Nov 30, 2016
·
3 revisions
AlgoliaSearchIndex
inherits configuration from Sitecore.ContentSearch.AbstractSearchIndex
.
Additional configuration added:
-
applicationId
- Algolia Application ID -
fullApiKey
- Algolia Api Key. This key should have permissions for Index management and should be secured. Do not use this key for search operations from UI. -
indexName
- Algolia index name. Index will be created automatically if it does not exist. -
site
- site name as it is defines in Sitecore config sections. If site is defined, fields can generate site specific content like full url to page.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<contentSearch>
<configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
<indexes hint="list:AddIndex">
<index id="algolia_test" type="Score.ContentSearch.Algolia.AlgoliaSearchIndex, Score.ContentSearch.Algolia">
<param desc="name">$(id)</param>
<param desc="applicationId">4U4JZCMJO2</param>
<param desc="fullApiKey">b9c172c5c52d094286825f8fbe2d2d7d</param>
<param desc="indexName">algolia-test</param>
<Site>website</Site>
<configuration ref="contentSearch/indexConfigurations/testAlgoliaIndexConfiguration" />
<strategies hint="list:AddStrategy">
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster" />
</strategies>
<locations hint="list:AddCrawler">
<crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>master</Database>
<Root>/sitecore/content/Home</Root>
</crawler>
</locations>
<propertyStore ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)">
</propertyStore>
</index>
</indexes>
</configuration>
</contentSearch>
</sitecore>
</configuration>
Custom Configuration:
-
ShowInSearchResultsFieldName
- field name that defines if item should be added to the index. No value in that field excludes item from index. This configuration extends standard sitecore features - Root and Templates list. By default all Items are indexed.
<locations hint="list:AddCrawler">
<crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>master</Database>
<Root>/sitecore/content/Home</Root>
<ShowInSearchResultsFieldName>Show In Search Results</ShowInSearchResultsFieldName>
</crawler>
</locations>