beginFeaturePath.addFeature(beginSpanFeature);
FSMatchConstraint beginSpanConstraint = constraintFactory.embedConstraint(beginFeaturePath, windowConstraint);
FeaturePath endFeaturePath = jcas.createFeaturePath();
endFeaturePath.addFeature(endSpanFeature);
FSMatchConstraint endSpanConstraint = constraintFactory.embedConstraint(endFeaturePath, windowConstraint);
FSMatchConstraint spanConstraint = constraintFactory.and(beginSpanConstraint, endSpanConstraint);
JFSIndexRepository indexes = jcas.getJFSIndexRepository();
FSIndex<?> annotIndex = indexes.getAnnotationIndex(type);