0

In 7.2, Below function AddAllFields was overridden for a custom search implementation.

public class DatabaseCrawler : Sitecore.Search.Crawlers.DatabaseCrawler
{
    protected override void AddAllFields(Document document, Item item, bool versionSpecific)
    {
        base.AddAllFields(document, item, versionSpecific);
        foreach (DatabaseCrawler.StoredField current in this._storedFields)
        {
            Sitecore.Data.Fields.Field field = item.Fields[current.SitecoreFieldName];
            if (field != null)
            {
                FieldCrawlerBase fieldCrawler = FieldCrawlerFactory.GetFieldCrawler(field);
                Assert.IsNotNull(fieldCrawler, "fieldCrawler");
                document.Add(base.CreateDataField(current.FieldName, fieldCrawler.GetValue()));
            }
        }
    }
}

Any idea how to achieve the same in Sitecore 9?

  • Can you add more info about what that actually does? If it's just to index all fields, then this is the default out of the box functionality in Sitecore 9. – Mark Gibbons Mar 14 '19 at 0:35
  • Above function used nowhere. Seems, it's just been added to index all fields. – user8927358 Mar 14 '19 at 4:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.