Query (Object)
This object is used for search element in wordbee.
Deprecated. Please use the query mechanisms described here:Â resources/segments/search
STRUCTURE
{ "filters":[], // Contain list of filter for limit results "locale":"en-GB", // locale apply on filters "sorts":[], // Allow to organize results "take":5, // Number of elements in the results "skip":2 // The results start at position }
The message body contains a JSON object:
filters | Contain list of Filter object |
locale | The locale used by filters |
sorts | Contain list of Sort object |
take | Number of elements |
skip | Start position to get elements |
Multiple sort
You can sort by multiple ....:
{ "filters":[], "locale":"en", "orderby":[ {"key":"Text","ascending":true}, // Sort results by Text ascending {"key":"LastModification","ascending":false} // And sort by LastModification descending ], "take":25, "skip":0 }
Multiple filter
You can sort by multiple ....:
{ "filters":[ {"KeywordId":"global","Value":{"value":["Test"], caseSensitive: true, exactMatch: false}}, // The segment text need to contains "Test" (Case sensitive) {"KeywordId":"status:","Value":{"value":["Problem"]}} // And status is "Problem" ], "locale":"en", "orderby":[ {"key":"Text","ascending":true}, // Sort results by Segment Id ], "take":25, "skip":0 }
EXAMPLES
See this example:
{ "filters":[ {"KeywordId":"global","Value":{"value":["test"], caseSensitive: true, exactMatch: false}}, {"KeywordId":"status:","Value":{"value":["Problem"]}}, {"KeywordId":"hasComments?","Value":{}} ], "locale":"fr", "orderby":[{"key":"SegmentId","ascending":true}], "take":25, "skip":0 }
Copyright Wordbee - Buzzin' Outside the Box since 2008