@@ 1367-1371 (lines=5) @@ | ||
1364 | $weight = sprintf('%u', $weight); |
|
1365 | ||
1366 | // create match entry |
|
1367 | if ($this->array_result) { |
|
1368 | $result['matches'][$idx] = array('id' => $doc, 'weight' => $weight); |
|
1369 | } else { |
|
1370 | $result['matches'][$doc]['weight'] = $weight; |
|
1371 | } |
|
1372 | ||
1373 | // parse and create attributes |
|
1374 | $attrvals = array(); |
|
@@ 1422-1426 (lines=5) @@ | ||
1419 | } |
|
1420 | } |
|
1421 | ||
1422 | if ($this->array_result) { |
|
1423 | $result['matches'][$idx]['attrs'] = $attrvals; |
|
1424 | } else { |
|
1425 | $result['matches'][$doc]['attrs'] = $attrvals; |
|
1426 | } |
|
1427 | } |
|
1428 | ||
1429 | list($total, $total_found, $msecs, $words) = array_values(unpack('N*N*N*N*', substr($response, $p, 16))); |