Lines Matching refs:array
38 the empty object is explicitly an object, not an array. To define this query in
43 $params['body'] = array(
44 'query' => array(
45 'match' => array(
49 'highlight' => array(
50 'fields' => array(
61 correctly output an empty object, instead of an empty array. This verbose
68 Another common pattern in {es} DSL is an array of objects. For example, consider
83 <1> "sort" contains an array of JSON objects.
87 actually going on. To construct an array of objects, you actually need an array
92 $params['body'] = array(
93 'query' => array(
94 'match' => array(
98 'sort' => array( <1>
99 array('time' => array('order' => 'desc')), <2>
100 array('popularity' => array('order' => 'desc')) <3>
105 <1> This array encodes the `"sort" : []` array
106 <2> This array encodes the `{"time" : {"order" : "desc"}}` object
107 <3> This array encodes the `{"popularity" : {"order" : "desc"}}` object
109 If you are on PHP 5.4+, we strongly encourage you to use the short array syntax.
132 The function score query is a good example, it sometimes requires an array of
158 $params['body'] = array(
159 'query' => array(
160 'function_score' => array(
161 'functions' => array( <1>
162 array( <2>
171 <1> This encodes the array of objects: `"functions" : []`
172 <2> This encodes an object inside the array: `{ "random_score": {} }`