/
Query (Object)

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

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 ....:

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

Related content

Scope (Object)
Scope (Object)
Read with this
TM Filters and Sort (Object)
TM Filters and Sort (Object)
More like this
resources/segments/view/actions/batch
resources/segments/view/actions/batch
Read with this
List segments of resource
List segments of resource
More like this
Field types and options
Field types and options
Read with this
Query Filter (Object)
Query Filter (Object)
More like this

Copyright Wordbee - Buzzin' Outside the Box since 2008