- foreach my $node ($xc->findnodes('zeerex:indexInfo/' .
- 'zeerex:index[@search="true"]')) {
- print "node=$node = ", $node->toString(), "\n";
- foreach my $map ($node->findnodes("zeerex:map")) {
- print "map=$map = ", $map->toString(), "\n";
- print("index.", $map->findvalue('@set'),
- " = ", $map->findvalue('.'));
+ foreach my $node ($xc->findnodes('z:indexInfo/' .
+ 'z:index[@search="true"]')) {
+ my @pqf = $xc->findnodes("z:map[z:attr]", $node);
+ die("no PQF mapping for index '" .
+ $xc->findvalue("z:title", $node) . "'")
+ if @pqf == 0;
+ # Just pick one if there's more than one: they all work
+
+ my $attrstr = "";
+ foreach my $attr ($xc->findnodes("z:attr", $pqf[0])) {
+ my $ptype = $xc->findvalue('@type', $attr);
+ my $pval = $xc->findvalue(".", $attr);
+ $attrstr .= " $ptype=$pval";
+ }
+
+ foreach my $map ($xc->findnodes("z:map", $node)) {
+ my $setname = $xc->findvalue('z:name/@set', $map);
+ my $indexname = $xc->findvalue('z:name', $map);
+ print "index.$setname.$indexname =$attrstr\n"
+ if $indexname ne "";