Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

Prerequisite

Info

Installed Sitefinity connector - Installing the Connector .NET SDK NuGet package

How is Export made behind the scenes?

...

In the Hawksearch Admin Panel (your-website-url/Sitefinity/Administration/hawksearchconfig), there are 2 buttons: “Run Full Export Now“ and “Run Delta Export Now“.

When one of the buttons is hit the “hawk/export/run” is called. This is a Http Post request where we pass as а parameter an integer number depending on which kind of export is being triggered. This number is later resolved from the ExportType enumerator, where:·        

  • FullExport = 0

...

  • DeltaExport = 1

Code Block
[HttpPost]
[Route("run")]
public JsonResult<OperationStatus> Run([FromBody] int exportType)
{
    var exportModel = new ExportModel();
    var result = exportModel.Run(exportType);

    return this.Json(result);
}

...

The Writer is implementing the interface IWiteIWriter:

Code Block
using Hawksearch.SDK.Indexing;
using System.Collections.Generic;
using System.Text;

namespace Hawksearch.SDK.Export.IO
{
    public interface IWriter
    {
        void Write(ref StringBuilder itemsSb, ref StringBuilder contentSb, ref StringBuilder attributesSb, ref StringBuilder hierarchySb, List<SubmitDocument> items);
    }
}

...