This object is used in the response to the /fields request to provide information about filters supported by the server.
{ "members": boolean, "query": boolean | string, "valueQuery": boolean | string }
Property/Type | Description |
---|---|
members Boolean |
optional A configuration of the include/exclude selection filter. If true , the selection filter is enabled for the field in Flexmonster. |
query Boolean | String[] |
optional A configuration of the conditional filter. To turn on this filter, either set query to true or specify an array of supported conditions.If the property is set to true , this enables all the conditions that exist in Flexmonster for the conditional filter. See the list of supported conditions for string, number, and date field types.The following conditions are supported for all field types: "equal" , "not_equal" , "between" , "not_between" . This list can be useful when specifying filters for all field types in the filters.any property. |
valueQuery Boolean | String[] |
optional A configuration of the value filter. To turn on this filter, either set valueQuery to true or specify an array of supported conditions.If the property is set to true , this enables all the conditions that exist in Flexmonster for the values filter. See the list of supported conditions. |
1) Here is an example of a response to the /fields request where the FilterConfigObject is used to define filters for all field types:
{ "fields": [ // List of fields ], "aggregations": ["sum", "average"], "filters": { "any": { "members": true, "query": ["equal", "not_equal"], "valueQuery": ["top","bottom"] } } }
2) Here is an example of a response to the /fields request where the FilterConfigObject is used to define filters for a specific field:
{ "fields": [ { "uniqueName": "Country", "type": "string", "filters": { "members": true, "query": ["begin", "not_begin", "end", "not_end"], "valueQuery": ["equal", "not_equal"] } } // Other fields ], }