Knowledge Discovery 25.4
Getting Started Guide

# Response Parameters

This section describes many of the most important parameters for the `Query` action that you can use to modify the query response.

For more information about each of these parameters, refer to the Content component Help.

## Predict and TotalResults

The `TotalResults` parameter allows you to find out how many query results exist in the Content component (when this values is higher than `MaxResults`). To return this information, set `TotalResults` to `True`.

For performance reasons, when there are a large number of results, the Content component does not normally compute the exact number. Instead, Content makes a guess at the total number of results, based on the distribution of the results that it has already found. This guess is almost always of the right order of magnitude, and is usually within 20% of the exact number.

To make Content compute the exact number of results, you can set the `Predict` parameter to `False`. However, this might incur a significant performance penalty. When you set `TotalResults` to `True` and `Predict` to `False`, Content also returns a breakdown of the available query results by database.

## Print and Printfields

The `Print` and `Printfields` parameters control the information from result documents that returns. The most important values for `Print` are `Fields`, `All`, `None`, and `NoResults`.

The default value for `Print` is `Fields`. In this case, the Content component returns metadata, and either any fields in the document that are configured as `PrintType`, or the fields that you list in the `PrintFields` parameter. If you set `PrintFields`, only the specified fields return.

For example, the following query returns the `PrintType` fields of the results:

    action=Query&Text=pillows&Print=Fields

The following query returns the `FIRMNESS`, `WEIGHT`, and `STUFFING` fields of the results, along with the document metadata. No other fields return.

    action=Query&Text=pillows&Print=Fields&PrintFields=FIRMNESS,WEIGHT,STUFFING

When you set `Print` to `All`, Content returns all fields in the results documents (except for hidden fields).

When you set `Print` to `None`, Content prints metadata such as the reference, document ID, and date for each result, but not the document content or fields.

When you set `Print` to `NoResults`, Content does not print any information about results at all; it returns only the number of results. This option is often used with the `QuerySummary` parameter (see QuerySummary) to return just the summary terms and phrases.

## QuerySummary

The `QuerySummary` parameter allows you to extract important common words and phrases from result documents. When you set `QuerySummary` to `True`, the Content component returns a list of these summary words and phrases at the top of the response (above the results).

You can use the collection of words and phrases as query guidance, where each phrase is a potential search that you can use to refine the original query. The query summary results might also expose aspects of the result set that you might not have known about originally.

For more information about using query summaries, refer to Knowledge Discovery Expert, and the Content component Help.

## ResponseFormat

The `ResponseFormat` parameter is available for all ACI actions. By default, all Knowledge Discovery responses are in XML format. You can set `ResponseFormat` to `JSON` to return JSON, or to `config` to return results in Knowledge Discovery configuration file format (a series of lines in `field=value` format).

## Sort

The `Sort` parameter controls the order in which results return. There are many options for sorting, but the most important ones are `Date`, `Relevance`, and field sort. For field sort, you specify the name of the field whose value you want to sort by, and a sorting method (for example, `alphabetical`, or `numberdecreasing`).

For example:

    Sort=relevance+date

This example sorts the query results by relevance. If two or more documents have the same relevance score, the Content component sorts them by the document date.

For a full list of the available sort and field sort options, refer to the Content component Help.

## Highlight, StartTag, and EndTag

The `Highlight` parameter controls how the Content component highlights match query terms and phrases in the result documents. For example, you can set `Highlight` to `Terms` to use highlight tags to surround each instance of a query term in the content of the result documents. You can use the `StartTag` and `EndTag` parameters to specify the tags that surround matching terms.

For example:

    action=Query&Text=quickly jumping&Highlight=Terms&StartTag=<strong>&EndTag=</strong>

If this query matches a document with the content the quick brown fox jumps over the lazy dog, the Content component returns the following modified content in the query response:

    the <strong>quick</strong> brown fox <strong>jumps</strong> over the lazy dog

For information about other available highlight options, refer to the Content component Help.

## Summary, Sentences, and Characters

The `Summary` parameter allows you to automatically create a summary of result documents. The main options for `Summary` are `Quick`, `Concept`, and `Context`. A quick summary is just the first few sentences of the result document. A concept summary contains sentences that are typical of the content of the result document. A context summary contains sentences from the document that contain words and phrases that match the query text.

You can use the `Sentences` and `Characters` parameters to control the maximum length of a summary.

## Cluster

The Content component can dynamically cluster the results of a query, grouping similar results together, by including a cluster id with each result document. To turn on dynamic clustering, set `Cluster` to `True`.

Copyright 2025 Open Text
Version 25.4 | Last updated October 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery 25.4

Topic Title: Response Parameters