Skip to main content

Query (Object)

This object is used for search element in wordbee.

Deprecated. Please use the query mechanisms described here: resources/segments/search




STRUCTURE

CODE
{
 "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

localeThe locale used by filters
sorts

Contain list of Sort object

take
Number of elements
skipStart position to get elements


Multiple sort

You can sort by multiple ....:

CODE
{
	"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 ....:

CODE
{
	"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:

CODE
{
	"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
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.