@Test public void testNDimensionalArray() { final StringField string = new StringField( "string", "value" ); final EntityObject nested1 = new EntityObject(); nested1.setField( string ); final ArrayField<String> subArray = new ArrayField<>( "subArray" ); subArray.add( "test2" ); final ArrayField<Object> array = new ArrayField<>( "array" ); array.add( subArray ); array.add( nested1 ); Entity rootEntity = new Entity( "test" ); rootEntity.setField( array ); final UUID version = UUIDGenerator.newTimeUUID(); EntityUtils.setVersion( rootEntity, version ); final ApplicationScope scope = new ApplicationScopeImpl( createId( "application" ) ); final IndexEdge indexEdge = new IndexEdgeImpl( createId( "source" ), "testEdgeType", SearchEdge.NodeType.SOURCE, 1000 ); final Map<String, Object> entityMap = EntityToMapConverter.convert( scope, indexEdge, rootEntity ); final Set<EntityField> fieldSet = ( Set<EntityField> ) entityMap.get( IndexingUtils.ENTITY_FIELDS ); final List<EntityField> fields = new ArrayList<>(); fields.addAll(fieldSet); assertEquals( 1, fields.size() ); final EntityField field = fields.get( 0 ); final String path = "array.string"; assertEquals( path, field.get( IndexingUtils.FIELD_NAME ) ); assertEquals( "value", field.get( IndexingUtils.FIELD_STRING ) ); }
public static Map<String, Object> convert(ApplicationScope applicationScope, final IndexEdge indexEdge, final Entity entity) { return convert( applicationScope, indexEdge, entity, Optional.absent() ); }
EntityToMapConverter { public static Map<String, Object> convert(ApplicationScope applicationScope, final IndexEdge indexEdge, final Entity entity) { return convert( applicationScope, indexEdge, entity, Optional.absent() ); } }
EntityToMapConverter { public static Map<String, Object> convert(ApplicationScope applicationScope, final IndexEdge indexEdge, final Entity entity) { return convert( applicationScope, indexEdge, entity, Optional.absent() ); }  }
EntityToMapConverter { public static Map<String, Object> convert(ApplicationScope applicationScope, final IndexEdge indexEdge, final Entity entity) { return convert( applicationScope, indexEdge, entity, Optional.absent() ); }  static Map<String, Object> convert(ApplicationScope applicationScope, final IndexEdge indexEdge,
                                              final Entity entity); static Map<String, Object> convert(ApplicationScope applicationScope, final IndexEdge indexEdge,
                                              final Entity entity, Optional<Set<String>> fieldsToIndex); }
EntityToMapConverter { public static Map<String, Object> convert(ApplicationScope applicationScope, final IndexEdge indexEdge, final Entity entity) { return convert( applicationScope, indexEdge, entity, Optional.absent() ); }  static Map<String, Object> convert(ApplicationScope applicationScope, final IndexEdge indexEdge,
                                              final Entity entity); static Map<String, Object> convert(ApplicationScope applicationScope, final IndexEdge indexEdge,
                                              final Entity entity, Optional<Set<String>> fieldsToIndex);  }