Fortis-Collection / fortis

A framework for creating a strongly typed model based on Sitecore templates and the Sitecore API

Home Page:http://fortis.ws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

InheritedTemplates computed field outputs lots of duplicates

vhil opened this issue · comments

currently if I look in SOLR I see
"_templates": [
"a8d7553329ba4513a8cba1f3328e481b",
"7835642460e94ca79cb2eefd842adae6",
"c99768fe5ef44a9aa06bf6f926391940",
"1930bbeb7805471aa3be4858ac7cf696",
"72e88ab19edc44a3ad1e38b641a7979c",
"c99768fe5ef44a9aa06bf6f926391940",
"1930bbeb7805471aa3be4858ac7cf696",
"2d6b1753b66e442aa34ac6c7a0d21ec4",
"c99768fe5ef44a9aa06bf6f926391940",
"1930bbeb7805471aa3be4858ac7cf696",
"bb73ab154a404588a3c2c9f006a6db12",
"c99768fe5ef44a9aa06bf6f926391940",
"1930bbeb7805471aa3be4858ac7cf696",
"dc5c5d0d1f28497ba04f7465521e4bdd",
"c99768fe5ef44a9aa06bf6f926391940",
"1930bbeb7805471aa3be4858ac7cf696",
"785fd97a49bb41278bdc22ffd598037f",
"c99768fe5ef44a9aa06bf6f926391940",
"1930bbeb7805471aa3be4858ac7cf696",
"0e24aa23e33548ebaeee4ba98cfd86f6",
"c99768fe5ef44a9aa06bf6f926391940",
"1930bbeb7805471aa3be4858ac7cf696",
"4563a70413dd49d98bdee92f45bcd546",
"1930bbeb7805471aa3be4858ac7cf696",
"c99768fe5ef44a9aa06bf6f926391940",
"1930bbeb7805471aa3be4858ac7cf696",
"888c055410d6469189a30e3ce1deb4b4",
"c99768fe5ef44a9aa06bf6f926391940",
"1930bbeb7805471aa3be4858ac7cf696"
],

There are lots of duplicates and that adds lots of redundant text to the indexes.

I created a fix and now my _templates field contains only unique ids.

"_templates": [
"a8d7553329ba4513a8cba1f3328e481b",
"7835642460e94ca79cb2eefd842adae6",
"c99768fe5ef44a9aa06bf6f926391940",
"1930bbeb7805471aa3be4858ac7cf696",
"72e88ab19edc44a3ad1e38b641a7979c",
"2d6b1753b66e442aa34ac6c7a0d21ec4",
"bb73ab154a404588a3c2c9f006a6db12",
"dc5c5d0d1f28497ba04f7465521e4bdd",
"785fd97a49bb41278bdc22ffd598037f",
"0e24aa23e33548ebaeee4ba98cfd86f6",
"4563a70413dd49d98bdee92f45bcd546",
"888c055410d6469189a30e3ce1deb4b4"
],

Please accept the pull request

Pull request accepted