diff --git a/deploys/docker-compose-dev.yml b/deploys/docker-compose-dev.yml index e67d296e..a645a1bc 100644 --- a/deploys/docker-compose-dev.yml +++ b/deploys/docker-compose-dev.yml @@ -18,6 +18,7 @@ services: environment: ZK_HOST: zoo:2181 SOLR_HOST: localhost + SOLR_HEAP: 4G SOLR_OPTS: "-Dsolr.environment=dev,label=DEV+ENV" depends_on: - zoo diff --git a/src/main/java/com/databasepreservation/DBVTK.java b/src/main/java/com/databasepreservation/DBVTK.java index 506f10aa..07d1a966 100644 --- a/src/main/java/com/databasepreservation/DBVTK.java +++ b/src/main/java/com/databasepreservation/DBVTK.java @@ -8,6 +8,7 @@ package com.databasepreservation; import java.io.IOException; +import java.net.http.HttpClient; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -261,6 +262,8 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) { } } + + // @Bean // MultipartConfigElement multipartConfigElement() { // MultipartConfigFactory factory = new MultipartConfigFactory(); diff --git a/src/main/java/com/databasepreservation/common/api/v1/CollectionResource.java b/src/main/java/com/databasepreservation/common/api/v1/CollectionResource.java index 74e6b7ca..16d6066a 100644 --- a/src/main/java/com/databasepreservation/common/api/v1/CollectionResource.java +++ b/src/main/java/com/databasepreservation/common/api/v1/CollectionResource.java @@ -195,7 +195,9 @@ public StringResponse createCollection(String databaseUUID) { try { final ViewerDatabase database = ViewerFactory.getSolrManager().retrieve(ViewerDatabase.class, databaseUUID); - return new StringResponse(SIARDController.loadFromLocal(database.getPath(), databaseUUID)); + StringResponse collection = new StringResponse(SIARDController.loadFromLocal(database.getPath(), databaseUUID)); + + return collection; } catch (GenericException | NotFoundException e) { state = LogEntryState.FAILURE; throw new RESTException(e); diff --git a/src/main/java/com/databasepreservation/common/api/v1/DatabaseResource.java b/src/main/java/com/databasepreservation/common/api/v1/DatabaseResource.java index 52777439..b5a6038c 100644 --- a/src/main/java/com/databasepreservation/common/api/v1/DatabaseResource.java +++ b/src/main/java/com/databasepreservation/common/api/v1/DatabaseResource.java @@ -8,7 +8,9 @@ package com.databasepreservation.common.api.v1; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Set; import org.roda.core.data.exceptions.GenericException; @@ -24,11 +26,17 @@ import com.databasepreservation.common.client.exceptions.RESTException; import com.databasepreservation.common.client.index.FindRequest; import com.databasepreservation.common.client.index.IndexResult; +import com.databasepreservation.common.client.index.facets.FacetFieldResult; +import com.databasepreservation.common.client.index.facets.FacetParameter; +import com.databasepreservation.common.client.index.facets.FacetValue; +import com.databasepreservation.common.client.index.facets.Facets; +import com.databasepreservation.common.client.index.facets.SimpleFacetParameter; import com.databasepreservation.common.client.index.filter.AndFiltersParameters; import com.databasepreservation.common.client.index.filter.Filter; import com.databasepreservation.common.client.index.filter.FilterParameter; import com.databasepreservation.common.client.index.filter.OrFiltersParameters; import com.databasepreservation.common.client.index.filter.SimpleFilterParameter; +import com.databasepreservation.common.client.index.sort.Sorter; import com.databasepreservation.common.client.models.activity.logs.LogEntryState; import com.databasepreservation.common.client.models.status.database.DatabaseStatus; import com.databasepreservation.common.client.models.structure.ViewerDatabase; @@ -39,6 +47,7 @@ import com.databasepreservation.common.server.ViewerConfiguration; import com.databasepreservation.common.server.ViewerFactory; import com.databasepreservation.common.server.controller.SIARDController; +import com.databasepreservation.common.server.index.utils.IterableDatabaseResult; import com.databasepreservation.common.utils.ControllerAssistant; import com.databasepreservation.common.utils.UserUtility; @@ -62,7 +71,10 @@ public IndexResult find(FindRequest findRequest, String localeSt if (ViewerConfiguration.getInstance().getApplicationEnvironment().equals(ViewerConstants.APPLICATION_ENV_SERVER)) { if (user.isAdmin() || user.isWhiteList()) { - return getViewerDatabaseIndexResult(findRequest, controllerAssistant, user, state); + + return getAllViewerDatabaseIndexResult(findRequest, controllerAssistant, user, state); + // return getViewerDatabaseIndexResult(findRequest, controllerAssistant, user, + // state); } else { List fieldsToReturn = new ArrayList<>(); fieldsToReturn.add(ViewerConstants.INDEX_ID); @@ -115,6 +127,69 @@ private IndexResult getViewerDatabaseIndexResult(FindRequest fin } } + private IndexResult getAllViewerDatabaseIndexResult(FindRequest findRequest, + ControllerAssistant controllerAssistant, User user, LogEntryState state) { + long count = 0; + try { + + // List databases + Filter availableFilter = new Filter( + new SimpleFilterParameter(ViewerConstants.SOLR_DATABASES_STATUS, ViewerDatabaseStatus.AVAILABLE.name())); + + IterableDatabaseResult databases = ViewerFactory.getSolrManager().findAll(ViewerDatabase.class, + availableFilter, Sorter.NONE, findRequest.fieldsToReturn); + + // Search on all collections + List collections = new ArrayList<>(); + Map databaseMap = new HashMap<>(); + for (ViewerDatabase database : databases) { + String collectionName = ViewerConstants.SOLR_INDEX_ROW_COLLECTION_NAME_PREFIX + database.getUuid(); + collections.add(collectionName); + databaseMap.put(database.getUuid(), database); + } + + SimpleFacetParameter simpleFacetParameter = new SimpleFacetParameter(ViewerConstants.SOLR_ROWS_DATABASE_UUID, + FacetParameter.SORT.COUNT); + simpleFacetParameter.setMinCount(1); + simpleFacetParameter.setLimit(15); + // set offset 0 + Facets facets = new Facets(simpleFacetParameter); + + final IndexResult result = ViewerFactory.getSolrManager().find(ViewerDatabase.class, collections, + findRequest.filter, findRequest.sorter, findRequest.sublist, facets, findRequest.fieldsToReturn); + count = result.getTotalCount(); + + IndexResult result2 = new IndexResult<>(); + result2.setTotalCount(-1); + result2.setLimit(100); + result2.setOffset(findRequest.sublist.getFirstElementIndex()); + List resultsFromFacet = new ArrayList<>(); + result2.setResults(resultsFromFacet); + // Retrieve the databases HITs + + for (FacetFieldResult facetResult : result.getFacetResults()) { + for (FacetValue value : facetResult.getValues()) { + String databaseUUID = value.getValue(); + long searchHits = value.getCount(); + + ViewerDatabase vd = databaseMap.get(databaseUUID); + vd.setSearchHits(searchHits); + resultsFromFacet.add(vd); + } + } + return result2; + + } catch (GenericException | RequestNotValidException e) { + state = LogEntryState.FAILURE; + throw new RESTException(e); + } finally { + // register action + controllerAssistant.registerAction(user, state, ViewerConstants.CONTROLLER_FILTER_PARAM, + JsonUtils.getJsonFromObject(findRequest.filter), ViewerConstants.CONTROLLER_SUBLIST_PARAM, + JsonUtils.getJsonFromObject(findRequest.sublist), ViewerConstants.CONTROLLER_RETRIEVE_COUNT, count); + } + } + private IndexResult getViewerDatabaseIndexResult(FindRequest findRequest, List fieldsToReturn, ControllerAssistant controllerAssistant, User user, LogEntryState state) { long count = 0; diff --git a/src/main/java/com/databasepreservation/common/client/ViewerConstants.java b/src/main/java/com/databasepreservation/common/client/ViewerConstants.java index c0f9440c..7e3eaf04 100644 --- a/src/main/java/com/databasepreservation/common/client/ViewerConstants.java +++ b/src/main/java/com/databasepreservation/common/client/ViewerConstants.java @@ -210,6 +210,7 @@ public class ViewerConstants { /* * ROW FIELDS */ + public static final String SOLR_ROWS_DATABASE_UUID = "databaseUUID"; public static final String SOLR_ROWS_TABLE_ID = "tableId"; public static final String SOLR_ROWS_TABLE_UUID = "tableUUID"; public static final String SOLR_ROWS_NESTED_UUID = "nestedUUID"; diff --git a/src/main/java/com/databasepreservation/common/client/models/structure/ViewerDatabase.java b/src/main/java/com/databasepreservation/common/client/models/structure/ViewerDatabase.java index bc2267e5..0d06ac64 100644 --- a/src/main/java/com/databasepreservation/common/client/models/structure/ViewerDatabase.java +++ b/src/main/java/com/databasepreservation/common/client/models/structure/ViewerDatabase.java @@ -39,6 +39,8 @@ public class ViewerDatabase extends IsIndexed { private String validationSkipped; private Set permissions; + private long searchHits = -1; + public ViewerDatabase() { } @@ -216,4 +218,13 @@ public Set getPermissions() { public void setPermissions(Set permissions) { this.permissions = permissions; } + + + public long getSearchHits() { + return searchHits; + } + + public void setSearchHits(long searchHits) { + this.searchHits = searchHits; + } } diff --git a/src/main/java/com/databasepreservation/common/client/models/structure/ViewerRow.java b/src/main/java/com/databasepreservation/common/client/models/structure/ViewerRow.java index 9ef8957a..54e668c8 100644 --- a/src/main/java/com/databasepreservation/common/client/models/structure/ViewerRow.java +++ b/src/main/java/com/databasepreservation/common/client/models/structure/ViewerRow.java @@ -24,6 +24,7 @@ public class ViewerRow extends IsIndexed { @Serial private static final long serialVersionUID = 5337660979887460340L; private String UUID; + private String databaseUUID; private String tableUUID; private String tableId; private Map cells; @@ -51,6 +52,14 @@ public void setUuid(String UUID) { this.UUID = UUID; } + public String getDatabaseUUID() { + return databaseUUID; + } + + public void setDatabaseUUID(String databaseUUID) { + this.databaseUUID = databaseUUID; + } + /** * @return Map of solrColumnName to cell value as string */ diff --git a/src/main/java/com/databasepreservation/common/server/index/DatabaseRowsSolrManager.java b/src/main/java/com/databasepreservation/common/server/index/DatabaseRowsSolrManager.java index 4b951396..53fb7c9f 100644 --- a/src/main/java/com/databasepreservation/common/server/index/DatabaseRowsSolrManager.java +++ b/src/main/java/com/databasepreservation/common/server/index/DatabaseRowsSolrManager.java @@ -17,14 +17,12 @@ import java.util.Map; import java.util.Set; -import com.databasepreservation.common.server.index.utils.IterableDatabaseResult; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.SolrQuery; import org.apache.solr.client.solrj.SolrRequest; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.request.CollectionAdminRequest; import org.apache.solr.client.solrj.response.UpdateResponse; -import org.apache.solr.common.SolrDocument; import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.SolrInputField; @@ -61,6 +59,7 @@ import com.databasepreservation.common.server.index.schema.SolrDefaultCollectionRegistry; import com.databasepreservation.common.server.index.schema.SolrRowsCollectionRegistry; import com.databasepreservation.common.server.index.schema.collections.RowsCollection; +import com.databasepreservation.common.server.index.utils.IterableDatabaseResult; import com.databasepreservation.common.server.index.utils.IterableIndexResult; import com.databasepreservation.common.server.index.utils.IterableNestedIndexResult; import com.databasepreservation.common.server.index.utils.JsonTransformer; @@ -182,6 +181,13 @@ public IndexResult find(Class classToReturn, Filter fieldsToReturn, new HashMap<>()); } + public IndexResult find(Class classToReturn, List collections, Filter filter, + Sorter sorter, Sublist sublist, Facets facets, List fieldsToReturn) + throws GenericException, RequestNotValidException { + return SolrUtils.find(client, SolrDefaultCollectionRegistry.get(classToReturn), collections, filter, sorter, + sublist, facets, fieldsToReturn, new HashMap<>()); + } + public IndexResult find(Class classToReturn, Filter filter, Sorter sorter, Sublist sublist, Facets facets) throws GenericException, RequestNotValidException { return find(classToReturn, filter, sorter, sublist, facets, new ArrayList<>()); diff --git a/src/main/java/com/databasepreservation/common/server/index/schema/collections/RowsCollection.java b/src/main/java/com/databasepreservation/common/server/index/schema/collections/RowsCollection.java index f0f9e056..1f296318 100644 --- a/src/main/java/com/databasepreservation/common/server/index/schema/collections/RowsCollection.java +++ b/src/main/java/com/databasepreservation/common/server/index/schema/collections/RowsCollection.java @@ -8,6 +8,7 @@ package com.databasepreservation.common.server.index.schema.collections; import static com.databasepreservation.common.client.ViewerConstants.SOLR_INDEX_ROW_COLLECTION_NAME_PREFIX; +import static com.databasepreservation.common.client.ViewerConstants.SOLR_ROWS_DATABASE_UUID; import static com.databasepreservation.common.client.ViewerConstants.SOLR_ROWS_NESTED_TABLE_ID; import static com.databasepreservation.common.client.ViewerConstants.SOLR_ROWS_TABLE_ID; import static com.databasepreservation.common.client.ViewerConstants.SOLR_ROWS_TABLE_UUID; @@ -72,6 +73,7 @@ public List getCopyFields() { public List getFields() { List fields = new ArrayList<>(super.getFields()); + fields.add(new Field(SOLR_ROWS_DATABASE_UUID, Field.TYPE_STRING).setIndexed(true).setStored(true)); fields.add(new Field(SOLR_ROWS_TABLE_ID, Field.TYPE_STRING).setIndexed(true).setStored(true)); fields.add(new Field(SOLR_ROWS_TABLE_UUID, Field.TYPE_STRING).setIndexed(true).setStored(true)); @@ -88,6 +90,7 @@ public SolrInputDocument toSolrDocument(ViewerRow row) throws ViewerException, R SolrInputDocument doc = super.toSolrDocument(row); + doc.setField(ViewerConstants.SOLR_ROWS_DATABASE_UUID, row.getDatabaseUUID()); doc.setField(ViewerConstants.SOLR_ROWS_TABLE_ID, row.getTableId()); doc.setField(SOLR_ROWS_TABLE_UUID, row.getTableUUID()); for (Map.Entry cellEntry : row.getCells().entrySet()) { @@ -120,6 +123,7 @@ public SolrInputDocument toSolrDocument(ViewerRow row) throws ViewerException, R public ViewerRow fromSolrDocument(SolrDocument doc) throws ViewerException { ViewerRow viewerRow = super.fromSolrDocument(doc); + viewerRow.setDatabaseUUID(SolrUtils.objectToString(doc.get(ViewerConstants.SOLR_ROWS_DATABASE_UUID), null)); viewerRow.setTableId(SolrUtils.objectToString(doc.get(ViewerConstants.SOLR_ROWS_TABLE_ID), null)); viewerRow.setTableUUID(SolrUtils.objectToString(doc.get(ViewerConstants.SOLR_ROWS_TABLE_UUID), null)); viewerRow.setNestedUUID(SolrUtils.objectToString(doc.get(ViewerConstants.SOLR_ROWS_NESTED_UUID), null)); @@ -159,6 +163,7 @@ public ViewerRow fromSolrDocument(SolrDocument doc) throws ViewerException { private ViewerRow populateNestedRow(SolrDocument doc) throws ViewerException { ViewerRow nestedRow = super.fromSolrDocument(doc); + nestedRow.setDatabaseUUID(SolrUtils.objectToString(doc.get(SOLR_ROWS_DATABASE_UUID), null)); nestedRow.setTableId(SolrUtils.objectToString(doc.get(SOLR_ROWS_TABLE_ID), null)); nestedRow.setTableUUID(SolrUtils.objectToString(doc.get(SOLR_ROWS_TABLE_UUID), null)); nestedRow.setTableId(SolrUtils.objectToString(doc.get(SOLR_ROWS_NESTED_TABLE_ID), null)); diff --git a/src/main/java/com/databasepreservation/common/server/index/utils/SolrAlias.java b/src/main/java/com/databasepreservation/common/server/index/utils/SolrAlias.java new file mode 100644 index 00000000..64e18335 --- /dev/null +++ b/src/main/java/com/databasepreservation/common/server/index/utils/SolrAlias.java @@ -0,0 +1,60 @@ +package com.databasepreservation.common.server.index.utils; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; +import java.util.Objects; + +/** + * @author Gabriel Barros + */ +public class SolrAlias implements Serializable { + @Serial + private static final long serialVersionUID = -5247919236401053565L; + + @JsonProperty("name") + private String name; + @JsonProperty("collections") + private List collections; + + public SolrAlias() { + } + + public SolrAlias(String aliasName, List collections) { + this.name = aliasName; + this.collections = collections; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public List getCollections() { + return collections; + } + + public void setCollections(List collections) { + this.collections = collections; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; + SolrAlias solrAlias = (SolrAlias) o; + return Objects.equals(name, solrAlias.name) && Objects.equals(collections, solrAlias.collections); + } + + @Override + public int hashCode() { + return Objects.hash(name, collections); + } +} diff --git a/src/main/java/com/databasepreservation/common/server/index/utils/SolrUtils.java b/src/main/java/com/databasepreservation/common/server/index/utils/SolrUtils.java index af3cefcd..9aa50775 100644 --- a/src/main/java/com/databasepreservation/common/server/index/utils/SolrUtils.java +++ b/src/main/java/com/databasepreservation/common/server/index/utils/SolrUtils.java @@ -27,11 +27,14 @@ import java.util.TimeZone; import java.util.UUID; -import com.databasepreservation.common.server.index.schema.SolrDefaultCollectionRegistry; import org.apache.commons.lang3.StringUtils; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.SolrRequest; import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.client.solrj.request.CollectionAdminRequest; +import org.apache.solr.client.solrj.request.QueryRequest; +import org.apache.solr.client.solrj.request.V2Request; import org.apache.solr.client.solrj.response.FacetField; import org.apache.solr.client.solrj.response.QueryResponse; import org.apache.solr.common.SolrDocument; @@ -41,6 +44,7 @@ import org.apache.solr.common.params.FacetParams; import org.apache.solr.common.params.MapSolrParams; import org.apache.solr.common.params.SolrParams; +import org.apache.solr.common.util.NamedList; import org.roda.core.data.common.RodaConstants; import org.roda.core.data.exceptions.GenericException; import org.roda.core.data.exceptions.NotFoundException; @@ -79,6 +83,7 @@ import com.databasepreservation.common.exceptions.ViewerException; import com.databasepreservation.common.filter.solr.TermsFilterParameter; import com.databasepreservation.common.server.index.schema.SolrCollection; +import com.databasepreservation.common.server.index.schema.SolrDefaultCollectionRegistry; import com.databasepreservation.common.server.index.schema.SolrRowsCollectionRegistry; import com.databasepreservation.common.server.index.schema.collections.RowsCollection; @@ -174,6 +179,64 @@ public static IndexResult find(SolrClient index, SolrCo return ret; } + public static IndexResult find(SolrClient index, SolrCollection collection, + List collections, Filter filter, Sorter sorter, Sublist sublist, Facets facets, List fieldsToReturn, + Map extraParameters) throws GenericException, RequestNotValidException { + IndexResult ret; + SolrQuery query = new SolrQuery(); + query.setQuery(parseFilter(filter)); + final List sortClauses = parseSorter(sorter); + sortClauses.add(SolrQuery.SortClause.asc(RodaConstants.INDEX_UUID)); + query.setSorts(sortClauses); + query.setStart(sublist.getFirstElementIndex()); + query.setRows(0); + + crateSearchAllAlias(index, "aliascollection3", collections); + + if (!extraParameters.isEmpty()) { + List extraFields = new ArrayList<>(); + for (Map.Entry entry : extraParameters.entrySet()) { + query.setParam(entry.getKey(), entry.getValue()); + extraFields.add(entry.getKey()); + } + } + + if (!fieldsToReturn.isEmpty()) { + query.setFields(fieldsToReturn.toArray(new String[0])); + } + parseAndConfigureFacets(facets, query); + + try { + QueryRequest request = new QueryRequest(query); + request.setMethod(SolrRequest.METHOD.POST); + + NamedList namedList = index.request(request, "aliascollection3"); + QueryResponse response = new QueryResponse(); + response.setResponse(namedList); + //QueryResponse response = index.query(collections.get(0), query); + ret = queryResponseToIndexResult(response, collection, facets); + } catch (SolrException e) { + boolean shouldReturnEmptyResult = (e.code() == 404); + // there may be other cases where an empty result should be returned + if (shouldReturnEmptyResult) { + // build an empty IndexedResult + final SolrDocumentList docList = new SolrDocumentList(); + final List facetResults = processFacetFields(facets, null); + final long offset = docList.getStart(); + final long limit = docList.size(); + final long totalCount = docList.getNumFound(); + final List docs = new ArrayList(); + ret = new IndexResult(offset, limit, totalCount, docs, facetResults); + } else { + throw buildGenericException(e); + } + } catch (SolrServerException | IOException e) { + throw buildGenericException(e); + } + + return ret; + } + public static IndexResult findRows(SolrClient index, String databaseUUID, Filter filter, Sorter sorter, Sublist sublist) throws GenericException, RequestNotValidException { return findRows(index, databaseUUID, filter, sorter, sublist, Facets.NONE); @@ -405,13 +468,13 @@ private static void parseAndConfigureFacets(Facets facets, SolrQuery query) { private static void setQueryFacetParameter(SolrQuery query, SimpleFacetParameter facetParameter) { query.addFacetField(facetParameter.getName()); - if (facetParameter.getMinCount() != FacetParameter.DEFAULT_MIN_COUNT) { - query.add(String.format("f.%s.facet.mincount", facetParameter.getName()), - String.valueOf(facetParameter.getMinCount())); - } - if (facetParameter.getLimit() != SimpleFacetParameter.DEFAULT_LIMIT) { - query.add(String.format("f.%s.facet.limit", facetParameter.getName()), String.valueOf(facetParameter.getLimit())); - } + // if (facetParameter.getMinCount() != FacetParameter.DEFAULT_MIN_COUNT) { + query.add(String.format("f.%s.facet.mincount", facetParameter.getName()), + String.valueOf(facetParameter.getMinCount())); + // } + // if (facetParameter.getLimit() != SimpleFacetParameter.DEFAULT_LIMIT) { + query.add(String.format("f.%s.facet.limit", facetParameter.getName()), String.valueOf(facetParameter.getLimit())); + // } } public static IndexResult queryResponseToIndexResult(QueryResponse response, @@ -1255,4 +1318,19 @@ public static > E objectToEnum(Object object, Class enumera } return ret; } + + public static void crateSearchAllAlias(SolrClient index, String aliasName, List collections) { +// SolrAlias solrAlias = new SolrAlias(aliasName, collections); +// +// V2Request request = new V2Request.Builder("/aliases").withMethod(SolrRequest.METHOD.POST).withPayload(solrAlias).forceV2(true) +// .build(); + + CollectionAdminRequest.CreateAlias request = CollectionAdminRequest.createAlias(aliasName, String.join(",", collections)); + request.setMethod(SolrRequest.METHOD.POST); + try { + index.request(request); + } catch (SolrServerException | IOException e) { + throw new RuntimeException(e); + } + } } diff --git a/src/main/java/com/databasepreservation/common/transformers/ToolkitStructure2ViewerStructure.java b/src/main/java/com/databasepreservation/common/transformers/ToolkitStructure2ViewerStructure.java index a7f37b93..85cdb5f5 100644 --- a/src/main/java/com/databasepreservation/common/transformers/ToolkitStructure2ViewerStructure.java +++ b/src/main/java/com/databasepreservation/common/transformers/ToolkitStructure2ViewerStructure.java @@ -755,6 +755,7 @@ public static ViewerRow getRow(CollectionStatus collectionConfiguration, ViewerT ViewerRow result = new ViewerRow(); // String rowUUID = SolrUtils.UUIDFromString(table.getUuid() + "." + rowIndex); String rowUUID = String.valueOf(rowIndex); + result.setDatabaseUUID(collectionConfiguration.getDatabaseUUID()); result.setTableId(table.getId()); result.setTableUUID(table.getUuid()); result.setUuid(rowUUID); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 92b3588e..2502bca1 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -23,3 +23,5 @@ management.endpoint.metrics.enabled=true management.endpoints.web.exposure.include=* management.endpoint.prometheus.enabled=true management.metrics.export.prometheus.enabled=true + +spring.jetty.httpClient.max-buffer-size=120000000000