diff --git a/backend/src/main/java/com/bakdata/conquery/resources/api/ConceptsProcessor.java b/backend/src/main/java/com/bakdata/conquery/resources/api/ConceptsProcessor.java index 257ce9d0b0..bb83822920 100644 --- a/backend/src/main/java/com/bakdata/conquery/resources/api/ConceptsProcessor.java +++ b/backend/src/main/java/com/bakdata/conquery/resources/api/ConceptsProcessor.java @@ -154,7 +154,7 @@ public FrontendPreviewConfig getEntityPreviewFrontendConfig(Dataset dataset) { * Search for all search terms at once, with stricter scoring. * The user will upload a file and expect only well-corresponding resolutions. */ - public ResolvedConceptsResult resolveFilterValues(Searchable searchable, List searchTerms) { + public ResolvedFilterValues resolveFilterValues(Searchable searchable, List searchTerms) { // search in the full text engine final Set openSearchTerms = new HashSet<>(searchTerms); @@ -181,7 +181,7 @@ public ResolvedConceptsResult resolveFilterValues(Searchable searchable, List // Not all Searchables are children of Connectors. final ConnectorId connectorId = searchable instanceof Filter asFilter ? asFilter.getConnector().getId() : null; - return new ResolvedConceptsResult(null, new ResolvedFilterResult(connectorId, searchable.getId().toString(), out), openSearchTerms); + return new ResolvedFilterValues(new ResolvedFilterResult(connectorId, searchable.getId().toString(), out), openSearchTerms); } public AutoCompleteResult autocompleteTextFilter(Searchable searchable, Optional maybeText, OptionalInt pageNumberOpt, OptionalInt itemsPerPageOpt) { @@ -309,7 +309,7 @@ public ResolvedConceptsResult resolveConceptElements(TreeConcept concept, List> resolvedConcepts, ResolvedFilterResult resolvedFilter, Collection unknownCodes) { + public record ResolvedFilterValues(ResolvedFilterResult resolvedFilter, Collection unknownCodes) { + + } + + public record ResolvedConceptsResult(Set> resolvedConcepts, Collection unknownCodes) { } } diff --git a/backend/src/main/java/com/bakdata/conquery/resources/api/FilterResource.java b/backend/src/main/java/com/bakdata/conquery/resources/api/FilterResource.java index 639e8de468..d3c77a85d5 100644 --- a/backend/src/main/java/com/bakdata/conquery/resources/api/FilterResource.java +++ b/backend/src/main/java/com/bakdata/conquery/resources/api/FilterResource.java @@ -21,7 +21,6 @@ import com.bakdata.conquery.models.auth.permissions.Ability; import com.bakdata.conquery.models.datasets.concepts.filters.Filter; import com.bakdata.conquery.models.datasets.concepts.filters.specific.SelectFilter; -import com.bakdata.conquery.resources.api.ConceptsProcessor.ResolvedConceptsResult; import com.bakdata.conquery.resources.hierarchies.HAuthorized; import lombok.NonNull; import lombok.RequiredArgsConstructor; @@ -44,7 +43,7 @@ public class FilterResource extends HAuthorized { @POST @Path("resolve") - public ResolvedConceptsResult resolveFilterValues(FilterValues filterValues) { + public ConceptsProcessor.ResolvedFilterValues resolveFilterValues(FilterValues filterValues) { subject.isPermitted(filter.getDataset(), Ability.READ); subject.isPermitted(filter.getConnector().findConcept(), Ability.READ);