1

We currently have the following code on our custom DNN module:

 public class FeatureController : ModuleSearchBase
    {

        public CommonDataDefinitions.Products.WebProductDetails ProductDetails { get; set; } = null;


        public override IList<SearchDocument> GetModifiedSearchDocuments(ModuleInfo moduleInfo, DateTime beginDateUtc)
        {

            var searchDocuments = new List<SearchDocument>
            {
                WHAT CAN I RETURN HERE?
            };

            return searchDocuments;

            throw new NotImplementedException();
        }
    }

Our Detailed Product View module retrieves the following information depending on the SKU in a query string on load using a web API Controller.

  • Product.Title
  • Product.Description
  • Product.Image
  • Product.Price
  • Product.DetailedDescription
  • Product.StockCode Product.MetaTitle
  • Product.MetaKeywords
  • Product.MetaDescription

The SearchModulebase code will be in the FeatureController class. This page will be loaded each time someone looks at a product in detail when they navigate from the Product Filter Module.

1. Since the module will be loaded each time when someone clicks on a particular product. How do you run this code only once and return all the products from the API Controller? Do we need to create an Object which will retrieve everything?

2. How do you prevent the module from becoming slow when all the products have to be retrieved on the on load event?

3. Which SearchDocument information can be returned for the DNN Crawler to index?

4. When the DNN Crawler reads the Feature Controller code, how do you initialize your API Controller to go and fetch and Populate the results to be indexed?

VDWWD
  • 35,079
  • 22
  • 62
  • 79
Tig7r
  • 525
  • 1
  • 4
  • 21
  • There is a lot here in the question which makes it hard for me to answer. If you are a DNNHero subscriber, check out my tutorial on DNN search integration which includes a working sample module. https://www.dnnhero.com/Premium/Tutorial/ArticleID/305/Search-Integration-DNN-Search-Overview-Part-1-4 – Fix It Scotty Sep 10 '18 at 19:49

0 Answers0