@@ 1494-1498 (lines=5) @@ | ||
1491 | $weight = sprintf('%u', $weight); |
|
1492 | ||
1493 | // create match entry |
|
1494 | if ($this->array_result) { |
|
1495 | $result['matches'][$idx] = array('id' => $doc, 'weight' => $weight); |
|
1496 | } else { |
|
1497 | $result['matches'][$doc]['weight'] = $weight; |
|
1498 | } |
|
1499 | ||
1500 | // parse and create attributes |
|
1501 | $attrvals = array(); |
|
@@ 1549-1553 (lines=5) @@ | ||
1546 | } |
|
1547 | } |
|
1548 | ||
1549 | if ($this->array_result) { |
|
1550 | $result['matches'][$idx]['attrs'] = $attrvals; |
|
1551 | } else { |
|
1552 | $result['matches'][$doc]['attrs'] = $attrvals; |
|
1553 | } |
|
1554 | } |
|
1555 | ||
1556 | list($total, $total_found, $msecs, $words) = array_values(unpack('N*N*N*N*', substr($response, $p, 16))); |