public void createIndex(IndexKey key) {
        if (key == IndexKey.SPAN_NODE && annotations instanceof ListAnnotationContainer) {
            AnnotationContainer tmpAnnotations = new SpanNode2AnnotationContainer();
            tmpAnnotations.annotateAll(annotations.annotations());
            annotations = tmpAnnotations;
        } else if (key == IndexKey.ANNOTATION_TYPE && annotations instanceof ListAnnotationContainer) {
            AnnotationContainer tmpAnnotations = new AnnotationType2AnnotationContainer();
            tmpAnnotations.annotateAll(annotations.annotations());
            annotations = tmpAnnotations;
        } else {
            throw new IllegalArgumentException("Multiple indexes not yet supported. Use clearIndex() or clearIndexes() first.");
        }
    }
Returns the StringFieldValue that this SpanTree belongs to.

@return the StringFieldValue that this SpanTree belongs to, if any, otherwise null.
document/src/main/java/com/yahoo/document/annotation/SpanTree.java