NodeSet hits = null; for (int k = 0; k < terms.length; k++) { hits = context.getBroker().getTextEngine().getNodesContaining( contextSet.getDocumentSet(), contextSet, terms[k]); if (hits == null)
NodeSet hits[] = new NodeSet[terms.length]; for (int k = 0; k < terms.length; k++) { hits[k] = context.getBroker().getTextEngine().getNodesContaining( contextSet.getDocumentSet(), contextSet, terms[k]); } NodeSet result = hits[0]; if(result != null) { for(int k = 1; k < hits.length; k++) { if(hits[k] != null) result = (type == Constants.FULLTEXT_AND ? result.deepIntersection(hits[k]) : result.union(hits[k])); } return result; } else
	protected NodeSet processQuery(		XQueryContext context,		NodeSet contextSet) {		if (terms == null)			throw new RuntimeException("no search terms");		NodeSet hits = null;		for (int k = 0; k < terms.length; k++) {			hits =				context.getBroker().getTextEngine().getNodesContaining(					contextSet.getDocumentSet(),					contextSet,					terms[k]);			if (hits == null)				return NodeSet.EMPTY_SET;			if (type == Constants.FULLTEXT_AND)				contextSet = hits;		}		return hits;	}