Skip to content

Content

In order to search for content pages in Ecommerce Search, they first need to be ingested. If using the Bizzkit CMS, ingestion of content pages into Ecommerce Search can be configured to happen automatically.

This is done simply by connecting an Ecommerce Segment with a Bizzkit CMS segment in the courier API.

Note

Only regular and scheduled articles from the Bizzkit CMS is suported in Ecommerce Search. In addition, target audience, anonymous rules, and split tests are not supported either.

For other content management solutions, ingestion of content can be done through the Ecommerce Search API, at the /api/ingestion/segments/{segmentId}/contents. See the full API reference here.

The Ecommerce Search ingestion API supports multiple sources of data. It is possible to ingest content pages from e.g. the CMS, but also provide additional data from a different source. The primary ingestion endpoint is PUT /api/ingestion/segments/{segmentId}/contents/bulk. The ingestion endpoint has a max batch size, so ingestion must be batched if there are more content pages than this limit.

Ingesting data is easily done with the SDK client:

private readonly ISearchAdministrationClientFactory _administrationClientFactory;

{...}

public async Task IngestContent(string segmentId, IEnumerable<ContentCreateBulkModel> content){
    var client = await _administrationClientFactory.CreateAuthenticatedClientAsync();

    foreach (var contentBatch in content.Chunk(1000))
    {
        var contentBulkRequest = new ContentCreateBulkRequestModel { Contents = contentBatch };
        await client.CreateContentsAsync(segmentId, contentBulkRequest);
    }
}

It is also possible to patch content pages, updating specific properties. The intended use is to enable secondary providers of information. A typical example might be to have a primary provider create content pages in Ecommerce Search, but have a secondary provider patch string or number attributes onto existing content pages. When patching, only non-null values are added to the content page. E.g. a request with name = null will not overwrite the name. Note that the content pages will have to be created before they can be patched.

Deletion is done in bulk at POST /api/ingestion/segments/{segmentId}/contents/delete-bulk.

Segmentation

As the endpoint URLs indicate, a set of searchable content pages exists for each segment. This means that pages must be ingested for each segment. Whenever a publication is made for a segment, Ecommerce Search has to reprocess the content pages for the segment before it is ready for searching. Depending on the number of content pages in the segment, this might take some time.

Changes to content pages made through the API are applied immediately. This means that it is possible to affect the search experience without creating a new publication.