private void scanAndAddIndexes(BeanProperty parent,
	    boolean checkBeforeIndexing) {
	Class<?> clazz = getPropertyClass(parent);
	Index classIndex = clazz.getAnnotation(Index.class);

	if (checkBeforeIndexing ? (classIndex != null && classIndex.contents())
		: true) {
	    for (BeanProperty property : getAllProperties(clazz)) {
		Index index = property.getAnnotation(Index.class);
		if (index == null ? (classIndex != null && !classIndex
			.contents()) : !index.contents()) {
		    addIndex(parent == null ? property : getProperty(beanClass,
			    parent.toString() + "." + property));
		} else {
		    scanAndAddIndexes(property, index == null);
		}
	    }
	}
    }