Both formats are useful if you want to use the results of a query to navigate back to the hit element in the original document. A CSV listener is particularly apt if you need those intermediate results to be delivered quickly, in compact form, and don't want to parse XML to get at the constituent pieces. A Java StringTokenizer can easily unpack a CSV listener result.
All queries return a header line followed by a number of detail lines, one per hit.
If the hitCount is 0, there will be no further detail lines. The format of the detail lines depends on the node type. In all cases, the first two values are always docID and elemIx .