code: protected void indexCompositeKey(Set<Attribute> embeddedAttributes, EntityMetadata metadata, Object id,
          Document document, final MetamodelImpl metaModel) {
          // indexing individual fields of the composite key
          try {
              for (Attribute attribute : embeddedAttributes) {
                  if (!ReflectUtils.isTransientOrStatic((java.lang.reflect.Field) attribute.getJavaMember())) {
                      if (metaModel.isEmbeddable(attribute.getJavaType())) {
                          EmbeddableType embeddable = metaModel.embeddable(attribute.getJavaType());
                          indexCompositeKey(embeddable.getAttributes(), metadata,
                              ((java.lang.reflect.Field) attribute.getJavaMember()).get(id), document, metaModel);
                      } else {
                          String columnName = ((AbstractAttribute) attribute).getJPAColumnName();
                          addFieldToDocument(id, document, (java.lang.reflect.Field) attribute.getJavaMember(),
                              columnName, metadata.getEntityClazz().getSimpleName());
                      }
                  }
              }
          } catch (IllegalAccessException e) {
              LOG.error(e.getMessage());
          }
      }
docs: index compositekey
  
  @param metadata
  @param id
  @param document
  @param metaModel