Normally, ATG Search treats each user query as a separate isolated request, with no pre-existing state or context. However, many user searches are interrelated, and you may want to provide context. ATG Search captures several types of search context in its query request XML, and it is controlled by the following special element and attribute:
<query requestMode="mode
"
<priorInput>context
</priorInput>
The mode
value specifies how the context string in the priorInput
element is interpreted, and can be one of the following values:
normal
– The default value, no search context processing.subtractDoc
– Using the context as a preliminary query, eliminate from the current search results any that are from index items also returned by the context query.subtractAns
– Using the context as a preliminary query, eliminate from the current search results any that are statements also returned by the context query.penalizeDoc
– Using the context as a preliminary query, penalize any current search results that are from index items also returned by the context query. If the penalty exceeds the relevancy, the result is eliminated.penalizeAns
– Using the context as a preliminary query, penalize any current search results that are statements also returned by the context query. If the penalty exceeds the relevancy, the result is eliminated.withinDoc
– Using the context as a preliminary query, restrict the current search results to index items also returned by the context query.withinAns
– Using the context as a preliminary query, restrict the current search results to statements also returned by the context query
The subtract
modes represent the search scenario known as not like this, where the end-user does a search that returns relevant but poor results, and then directs the system to find results not like the poor results.
The penalize
modes represent the search scenario known as less like this, where the end-user does a search that returns relevant but poor results, and then directs the system to find results less like the poor results, but not necessarily eliminating them.
The within
modes represent the search scenario known as search within, where the end-user does a search that returns generally relevant results, and then directs the system to find results of a new query within those initial results.