desc.getAnalysisEngineMetaData().setTypePriorities(typePriorities);
FsIndexDescription index1 = new FsIndexDescription_impl();
index1.setLabel("Index1");
index1.setTypeName("Type1");
FsIndexKeyDescription key1 = new FsIndexKeyDescription_impl();
key1.setFeatureName("Feature1");
key1.setComparator(FSIndexComparator.STANDARD_COMPARE);
index1.setKeys(new FsIndexKeyDescription[] { key1 });
FsIndexDescription index2 = new FsIndexDescription_impl();
index2.setLabel("Index2");
index2.setTypeName("Type2");
index2.setKind(FsIndexDescription.KIND_SET);
FsIndexKeyDescription key2 = new FsIndexKeyDescription_impl();
key2.setFeatureName("Feature2");
key2.setComparator(FSIndexComparator.REVERSE_STANDARD_COMPARE);
index2.setKeys(new FsIndexKeyDescription[] { key2 });
FsIndexDescription index3 = new FsIndexDescription_impl();
index3.setLabel("Index3");
index3.setTypeName("uima.tcas.Annotation");
index3.setKind(FsIndexDescription.KIND_SORTED);
FsIndexKeyDescription key3 = new FsIndexKeyDescription_impl();
key3.setFeatureName("begin");
key3.setComparator(FSIndexComparator.STANDARD_COMPARE);
FsIndexKeyDescription key4 = new FsIndexKeyDescription_impl();
key4.setTypePriority(true);
index3.setKeys(new FsIndexKeyDescription[] { key3, key4 });
desc.getAnalysisEngineMetaData().setFsIndexes(
new FsIndexDescription[] { index1, index2, index3 });
// instantiate TextAnalysisEngine