Normally, the browse request takes a single item set as input and applies constraints and sorting criteria to all of the items contained in it (and its descendents). This simple algorithm is fine in most cases, but it can encounter performance issues as the number of items grows large and the constraint grows complex. To address this, the browse request can perform an intersection of the input item set and any other sets required in the constraint, reducing the number of items that must be considered for sorting or additional constraints. The intersection is much faster than the constraints, so the performance problems are addressed. The optimization happens automatically if the constraint contains a required item set test or a required property constraint that can be mapped to an item set. The following example will illustrate this.

<browse docSort="alpha">
<strprop name="vendor">ABC</strprop>

In this browse request, the <input> element refers to the set of all structured content, which could be very large. Ordinarily, it would have to retrieve every item and filter by the <documentSets> constraint, plus sort the resulting items. However, since one part of the constraint is a item set test ( /Topics/Products/XYZ), this set can be used to intersect with the top-level /Solutions set. Furthermore, the other part of a constraint is a string property (equality) test, which can be used in the intersection if it also was stored as an item set, i.e. /Meta/vendor/ABC. If this is true, an additional intersection would occur, further reducing the resulting items.

The browse optimization is controlled by using the following attributes:

<browse targetDocs="target" intersectMax="max"

The target value specifies the number of items that the intersection should strive to reduce to, stopping the optimization when the number is reached. This is valuable in case the initial input set or the first intersection reaches the target, the system can avoid the intersection process. The default value is 1000. The max value specifies the maximum size of an item set to use for intersection, as a percent of the total content collection. Intersecting very large sets are ineffective and wasteful. The default value is 0.50.

The browse request can also invoke this optimization directly, but supplying it with additional input item sets, in the form of:

<browse >

The set values are separated by an additional forward slash, as shown below:

<browse >

The first set is considered the primary one, and the subsequent ones are used for the intersection process.

The browse response contains information about which sets were used for the intersection and the resulting count of reduced items.

loading table of contents...