ReQL Segmentations

There are two types of ReQL Segmentations, both of which allow defining Segments using a ReQL expression.

With Manual ReQL Segmentation, you specify individual Segments of the Segmentation.

Each Segment is defined by a ReQL filter: Items passing the filter belong to the Segment.

Consider the same data about the Items as in this section.

You can create an Item Segmentation where each Segment will represent one row on the homepage.

With defined Segments as follows:

Items get segmented in this way:

You will get the optimal order of these homepage rows for the particular user by calling the Recommend Item Segments To User endpoint.

You can create individual Segments of the Manual ReQL Segmentation in the Admin UI
You can create individual Segments of the Manual ReQL Segmentation in the Admin UI
  • Navigate to the Segmentations section
  • Give the Segmentation a title, which gets translated into the Segmentation ID, and optionally also give a description
  • Create the first Segment by giving it a name (which gets again translated into the Segment's ID) and providing the ReQL filter
    • You can check which Items belong to the Segment by clicking on Preview items
  • Click Add Segment to add another Segment
  • When satisfied with the setup, click Create to confirm it

Auto ReQL Segmentation is specified by a ReQL expression that for each Item returns a set of Segments to which the Item belongs.

The individual Segments don't need to be predefined in any way.

The following expression returns the set of genres:

ReQL
'genres'

For example, for johnny_english it returns {"Comedy"} and for the_silence_of_the_lambs it returns {"Horror", "Thriller"}.

Therefore it behaves the same as the Property-based Segmentation using the genres property:

The following Segmentation put the Items into Segments according to their genres and also adds a Critically Acclaimed Segment for items with 'critically_acclaimed' == true.

ReQL
'genres' + (if 'critically_acclaimed' then {"Critically Acclaimed"} else {})

For example, for johnny_english it returns {"Comedy"}, for friends it returns {"Comedy", "Critically Acclaimed"}, and for the_silence_of_the_lambs it returns {"Horror", "Thriller", "Critically Acclaimed"}.

The Segments of the following Segmentation are a combination of the Item's genres and country (British comedies, US thrillers, etc.).

ReQL
map(lambda 'genre': 'genre' + "-" + 'country', 'genres')

For example, for johnny_english it returns {"Comedy-GB"}, for friends it returns {"Comedy-US"}, and for the_silence_of_the_lambs it returns {"Horror-US", "Thriller-US"}.

You can specify the ReQL expression for the Auto ReQL Segmentation in the Admin UI
You can specify the ReQL expression for the Auto ReQL Segmentation in the Admin UI
  • Navigate to the Segmentations section
  • Create a new Segmentation of the Auto ReQL type
  • Give the Segmentation a title, which gets translated into the Segmentation ID, and optionally also give a description
  • Provide the ReQL expression which returns a set of Segments to which an Item belongs
  • Check the preview of the resulting Segments and confirm the setup
© Copyright 2026, Recombee s.r.o
docs.recombee.com