List<QName> qnames = new ArrayList<>(1);
qnames.add(contextQName);
Properties options = parseOptions(contextSequence, null);
try {
if (Type.subTypeOf(key.getType(), Type.ELEMENT))
preselectResult = index.query(context, getExpressionId(), docs, useContext ? contextSequence.toNodeSet() : null,
qnames, (Element) ((NodeValue)key).getNode(), NodeSet.DESCENDANT, options);
else
preselectResult = index.query(context, getExpressionId(), docs, useContext ? contextSequence.toNodeSet() : null,
qnames, key.getStringValue(), NodeSet.DESCENDANT, options);
} catch (IOException | org.apache.lucene.queryparser.classic.ParseException e) {