The QueryRequest
class has docProps
and textProps
properties that specify lists of the metadata and text properties to include in the response. If a property is specified in one of these lists, its values are included in the search results that are returned. This simplifies displaying these values in JSPs, since otherwise you’d need to retrieve them from the indexed repository.
The textProps
property is an array listing the text properties to return. The names must include the role:
prefix. For example, you might set textProps
like this:
textProps+=role:longDescription,role:parentCategory.displayName
The docProps
property is an array listing the metadata properties to return. For example, you might set docProps
like this:
docProps+=childSKUs.color,childSKUs.salePrice
If you want to return all of the metadata properties in the index, you can set docProps
to the special keyword all
, rather than specifying the properties individually. For example:
docProps=all