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 All 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.
When you set Type to rule_suggestion, you can use the text filter to specify an additional question to include in the rule suggestion.
{ "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" }
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, which 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"
   }
]}

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