@@ 1832-1836 (lines=5) @@ | ||
1829 | $weight = sprintf('%u', $weight); |
|
1830 | ||
1831 | // create match entry |
|
1832 | if ($this->array_result) { |
|
1833 | $result['matches'][$idx] = array('id' => $doc, 'weight' => $weight); |
|
1834 | } else { |
|
1835 | $result['matches'][$doc]['weight'] = $weight; |
|
1836 | } |
|
1837 | ||
1838 | // parse and create attributes |
|
1839 | $attrvals = array(); |
|
@@ 1887-1891 (lines=5) @@ | ||
1884 | } |
|
1885 | } |
|
1886 | ||
1887 | if ($this->array_result) { |
|
1888 | $result['matches'][$idx]['attrs'] = $attrvals; |
|
1889 | } else { |
|
1890 | $result['matches'][$doc]['attrs'] = $attrvals; |
|
1891 | } |
|
1892 | } |
|
1893 | ||
1894 | list($total, $total_found, $msecs, $words) = array_values(unpack('N*N*N*N*', substr($response, $p, 16))); |