Filter

A filter to use to restrict the resources to return.

You specify a filter as a percent-encoded JSON object that describes the filter to apply. The following table describes the available properties in the filter JSON object, and the values of the Type parameter that you can use the filter for.

Property Type values Description Format
text question
question_equivalence_class
A text filter, which matches the text in questions and rules in the items that GetResources returns. You can use any IDOL query text syntax, such as keywords, Boolean and proximity operators, and Wildcard characters.
{ "text": "some search text" }
answer_text question_equivalence_class A text filter, which matches the answer text in the question equivalence classes that GetResources returns. You can use any IDOL query text syntax, such as keywords, Boolean and proximity operators, and Wildcard characters. { "answer_text": "some search text" }
reference_question_text question_equivalence_class A text filter, which matches the reference question text in the question equivalence classes that GetResources returns. You can use any IDOL query text syntax, such as keywords, Boolean and proximity operators, and Wildcard characters. { "reference_question_text": "some search text" }
rule_suggestion_text rule_suggestion An array of additional questions to include in the rule suggestion. You can use this option to suggest a rule for a set of questions that do not exist in the Answer Bank index. { "rule_suggestion_text": ["some search text"] }
state question
question_equivalence_class
A question or question equivalence class state filter, which allows you to find items with a particular state.
The possible question state values are: incoming, answerable, needs_answer, answered, or rejected.
The possible question equivalence class state values are: incoming, or published.
{"state": ["State_Value"]}
not_associated_with question A question equivalence class ID filter that allows you to find questions that are not in a particular question equivalence class. You can use this option to check whether a particular question equivalence rule (which you specify in the text filter) matches questions that are in another question equivalence class, or that are not associated with a question equivalence class. { "not_associated_with": [
   {
      "ids": ["QEC_IDs"],
      "type": "question_equivalence_class"
   }
]}
likely_answer_for question_equivalence_class A question ID filter that allows you to find question equivalence classes that are likely to provide an answer for a particular question. This option finds the question equivalence classes that HPE Answer Server considers to be most relevant when it calculates the likelihood of answer score (see Sort). { "likely_answer_for": [
   {
      "ids": ["Question_IDs"],
      "type": "question"
   }
]}
ignore_special_characters question
question_equivalence_class
A Boolean value that specifies whether to treat special query syntax characters and operators as syntax or as plain text. Set this parameter to true to ignore special characters in the text, answer_text, and reference_question_text properties, and treat the string as plain text. In this case, HPE Answer Server ignores syntax characters, such as wildcards (? and *), as well as Boolean and proximity operators. The default value is false. { "ignore_special_characters": true }

You can specify multiple filters in the same JSON object.

For example, the following JSON object filters by the text President, and the question state incoming, answerable, or needs_answer:

{
"text" : "President", "state" : [ "incoming", "answerable", "needs_answer" ] }
Actions: GetResources
Type: String
Default: all
Example: Filter=%7B%20%22text%22%3A%20%22some%20search%20text%22%20%7D
See Also: IDs

_HP_HTML5_bannerTitle.htm