}
return r;
    private Sequence exactMatch(XQueryContext context, NodeSet result) {	// walk through hits and calculate term-distances	String value;	String term;	String word;	TextToken token;	NodeProxy current;	NodeSet r = new ExtArrayNodeSet();	Tokenizer tok = context.getBroker().getTextEngine().getTokenizer();	int j;	int current_distance;	for (Iterator i = result.iterator(); i.hasNext();) {	    current = (NodeProxy) i.next();	    value = current.getNodeValueSeparated();	    tok.setText(value);	    j = 0;	    if (j < terms.length) {		term = terms[j];	    } else {		break;	    }	    current_distance = -1;	    	    while ((token = tok.nextToken()) != null) {		word = token.getText().toLowerCase();		if (current_distance > max_distance) {		    // reset		    j = 0;		    term = terms[j];		    current_distance = -1;						} // that else would cause some words to be ignored in the matching		if (word.equalsIgnoreCase(term)) {		    boolean withIn = current_distance >= min_distance ? true : false;		    current_distance = 0;		    j++;		    if (j == terms.length) {			// all terms found			if (withIn) {			    r.add(current);			}			break;		    } else {			term = terms[j];		    }		} else if (j > 0 && word.equalsIgnoreCase(terms[0])) {		    // first search term found: start again		    j = 1;		    term = terms[j];		    current_distance = 0;		    continue;		} // that else MAY cause the distance counts to be off by one but i'm not sure		if (-1 < current_distance) {		    ++current_distance;		}	    }	}	//		LOG.debug("found " + r.getLength());	return r;    }