@Test public void testElasticsearchUpdateAccessMetadatas() { Map<String, String> res = elasticsearchAccessMetadata.addIndex(MetadataCollections.UNIT, TENANT_ID_0); assertThat(res).hasSize(1); assertThat(res.keySet().iterator().next()).isEqualTo(prefix + "unit_0"); final String id = GUIDFactory.newUnitGUID(TENANT_ID_0).toString(); assertThatCode(() -> elasticsearchAccessMetadata .indexEntry(MetadataCollections.UNIT.getName().toLowerCase(), TENANT_ID_0, id, JsonHandler.getFromString(S1, Unit.class))).doesNotThrowAnyException(); }
public final Map<String, String> addIndex(final MetadataCollections collection, Integer tenantId) { try { return super.createIndexAndAliasIfAliasNotExists(collection.getName().toLowerCase(), getMapping(collection), tenantId); } catch (final Exception e) { LOGGER.error("Error while set Mapping", e); return new HashMap<>(); } }
ElasticsearchAccessMetadata extends ElasticsearchAccess { public final Map<String, String> addIndex(final MetadataCollections collection, Integer tenantId) { try { return super.createIndexAndAliasIfAliasNotExists(collection.getName().toLowerCase(), getMapping(collection), tenantId); } catch (final Exception e) { LOGGER.error("Error while set Mapping", e); return new HashMap<>(); } } }
ElasticsearchAccessMetadata extends ElasticsearchAccess { public final Map<String, String> addIndex(final MetadataCollections collection, Integer tenantId) { try { return super.createIndexAndAliasIfAliasNotExists(collection.getName().toLowerCase(), getMapping(collection), tenantId); } catch (final Exception e) { LOGGER.error("Error while set Mapping", e); return new HashMap<>(); } } ElasticsearchAccessMetadata(final String clusterName, List<ElasticsearchNode> nodes); }
ElasticsearchAccessMetadata extends ElasticsearchAccess { public final Map<String, String> addIndex(final MetadataCollections collection, Integer tenantId) { try { return super.createIndexAndAliasIfAliasNotExists(collection.getName().toLowerCase(), getMapping(collection), tenantId); } catch (final Exception e) { LOGGER.error("Error while set Mapping", e); return new HashMap<>(); } } ElasticsearchAccessMetadata(final String clusterName, List<ElasticsearchNode> nodes); final Map<String, String> addIndex(final MetadataCollections collection, Integer tenantId); SearchResponse basicSearch(MetadataCollections collection, Integer tenantId,
        List<AggregationBuilder> aggregations, QueryBuilder query); void insertFullDocument(MetadataCollections collection, Integer tenantId, String id, MetadataDocument doc); void insertFullDocuments(MetadataCollections collection, Integer tenantId,
        Collection<? extends MetadataDocument> documents); void updateFullDocument(MetadataCollections collection, Integer tenantId, String id,
        MetadataDocument metadataDocument); void deleteBulkOGEntriesIndexes(List<String> ids, final Integer tenantId); void deleteBulkUnitsEntriesIndexes(List<String> ids, final Integer tenantId); }
ElasticsearchAccessMetadata extends ElasticsearchAccess { public final Map<String, String> addIndex(final MetadataCollections collection, Integer tenantId) { try { return super.createIndexAndAliasIfAliasNotExists(collection.getName().toLowerCase(), getMapping(collection), tenantId); } catch (final Exception e) { LOGGER.error("Error while set Mapping", e); return new HashMap<>(); } } ElasticsearchAccessMetadata(final String clusterName, List<ElasticsearchNode> nodes); final Map<String, String> addIndex(final MetadataCollections collection, Integer tenantId); SearchResponse basicSearch(MetadataCollections collection, Integer tenantId,
        List<AggregationBuilder> aggregations, QueryBuilder query); void insertFullDocument(MetadataCollections collection, Integer tenantId, String id, MetadataDocument doc); void insertFullDocuments(MetadataCollections collection, Integer tenantId,
        Collection<? extends MetadataDocument> documents); void updateFullDocument(MetadataCollections collection, Integer tenantId, String id,
        MetadataDocument metadataDocument); void deleteBulkOGEntriesIndexes(List<String> ids, final Integer tenantId); void deleteBulkUnitsEntriesIndexes(List<String> ids, final Integer tenantId); static final String MAPPING_UNIT_FILE; static final String MAPPING_OBJECT_GROUP_FILE; }