--TEST--
CLucene: Hits, traversal.
--SKIPIF--
<?php

require_once('skipif.inc');

?>
--POST--
--GET--
--INI--
--FILE--
<?php

require_once('param.inc');

$searcher = new IndexSearcher($path, $field);
$query ="baseball OR mars OR letter OR lorem OR mowgli";
$hits = $searcher->search($query);

$length = $hits->length();

for ($i = 0; $i < $length; $i++) {
    var_dump($hits->get($i, "path"));
    var_dump($hits->id($i));
    var_dump(round($hits->score($i), 3));
}

$searcher->close();

?>
--EXPECT--
string(30) "data/the_war_of_the_worlds.txt"
int(1)
float(0.016)
string(21) "data/mowglis_song.txt"
int(4)
float(0.016)
string(20) "data/lorem_ipsum.txt"
int(2)
float(0.011)
string(19) "data/yogi_berra.txt"
int(3)
float(0.008)
string(30) "data/frankenstein_letter_1.txt"
int(0)
float(0.008)
