Skip to content

Best Practices for Content Integration

If your site requires search and recommendation of content, you will need to set up proper handling of content data to Relewise.

First, decide if you want to push or pull data between your site and the Relewise API. You can read more about the difference in pushing and pulling data here.

Relewise recommends pushing content data to the API. Pushing data is faster and potentially cheaper, and grants a higher level of control over the data stream and how it is formatted.

For concrete examples of integrating and updating content, refer to our Examples section:

Importing Content Pages via API

When you import content to Relewise, it should include everything you want your users to see: About-pages, content categories, blog posts, documentation, legal documents etc. Calling ContentUpdate allows you to both create and update content entities. You can read more about the basics of content integration here.

Best practice for importing content pages into Relewise is to include as few fields as possible. If you are uncertain if a certain key should be included in the request, follow this checklist:

  • Should the field be text searchable?
  • Should results be able to be filtered on the basis of this field?
  • Should results be able to be sorted on the basis of this field?
  • Do you need this field to be returned in results from Relwise (eg. for displaying on the website)?

If you can answer yes to at least one of these, the field should be included. Otherwise, leave it out.

If you need to disable Content pages in Relewise, use ContentAdministrativeAction to disable them, and ContentUpdate to create and update/enable them. Similarly, use ContentCategoryAdministrativeAction to disable Content Categories, and ContentCategoryUpdate to update or enable them.

Multilingual Properties

Even if your site only has a single language, we still urge you to use Multilingual properties for those of your fields that are meant to be directly searchable. A data key for an image path does not require multilingual setup, but for fields that you know your users will engage with, using multilanguage properties ensures that these fields are properly formatted and affected by the natural language processing built into Relewise.

csharp
content.data["Content"] = new Multilingual(
	new Multilingual.Value(en, "The English page content")
	)

Don't know us? Don't worry - you can find more information about us, by visiting our main page www.relewise.com