diff --git a/cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/bool/FindDistinctElementsByColumnPostHandler.java b/cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/bool/FindDistinctElementsByColumnPostHandler.java index 64f45670a..9038e4aff 100644 --- a/cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/bool/FindDistinctElementsByColumnPostHandler.java +++ b/cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/bool/FindDistinctElementsByColumnPostHandler.java @@ -16,6 +16,7 @@ import org.vitrivr.cineast.api.messages.result.DistinctElementsResult; import org.vitrivr.cineast.api.rest.handlers.interfaces.ParsingPostRestHandler; import org.vitrivr.cineast.core.data.providers.primitive.PrimitiveTypeProvider; +import org.vitrivr.cineast.core.data.providers.primitive.ProviderDataType; import org.vitrivr.cineast.core.db.DBSelector; import org.vitrivr.cineast.standalone.config.Config; @@ -48,7 +49,7 @@ public DistinctElementsResult performPost(ColumnSpecification specification, Con } StopWatch watch = StopWatch.createStarted(); selector.open(specification.table()); - distinct = selector.getUniqueValues(specification.column()).stream().map(PrimitiveTypeProvider::getString).collect(Collectors.toList()); + distinct = selector.getUniqueValues(specification.column()).stream().filter(p -> p.getType() != ProviderDataType.UNKNOWN).map(PrimitiveTypeProvider::getString).collect(Collectors.toList()); cache.put(specification.table() + specification.column(), distinct); LOGGER.trace("Retrieved unique values for {} in {} ms", specification.table() + "." + specification.column(), watch.getTime(TimeUnit.MILLISECONDS)); return new DistinctElementsResult("", distinct); diff --git a/cineast-core/src/main/java/org/vitrivr/cineast/core/data/providers/primitive/NothingProvider.java b/cineast-core/src/main/java/org/vitrivr/cineast/core/data/providers/primitive/NothingProvider.java index 2cd208b9f..28bfcc624 100644 --- a/cineast-core/src/main/java/org/vitrivr/cineast/core/data/providers/primitive/NothingProvider.java +++ b/cineast-core/src/main/java/org/vitrivr/cineast/core/data/providers/primitive/NothingProvider.java @@ -14,4 +14,4 @@ public String toString() { return "NothingProvider"; } -} \ No newline at end of file +} diff --git a/cineast-core/src/main/java/org/vitrivr/cineast/core/data/providers/primitive/StringProvider.java b/cineast-core/src/main/java/org/vitrivr/cineast/core/data/providers/primitive/StringProvider.java index 13c558f94..2a575c9d6 100644 --- a/cineast-core/src/main/java/org/vitrivr/cineast/core/data/providers/primitive/StringProvider.java +++ b/cineast-core/src/main/java/org/vitrivr/cineast/core/data/providers/primitive/StringProvider.java @@ -3,7 +3,7 @@ public interface StringProvider { default String getString() { - throw new UnsupportedOperationException("No string value specified"); + throw new UnsupportedOperationException("No string value specified: " + this); } } diff --git a/cineast-core/src/main/java/org/vitrivr/cineast/core/features/abstracts/BooleanRetriever.java b/cineast-core/src/main/java/org/vitrivr/cineast/core/features/abstracts/BooleanRetriever.java index 54420bbda..10f0899f3 100644 --- a/cineast-core/src/main/java/org/vitrivr/cineast/core/features/abstracts/BooleanRetriever.java +++ b/cineast-core/src/main/java/org/vitrivr/cineast/core/features/abstracts/BooleanRetriever.java @@ -89,6 +89,7 @@ public List getSimilar(SegmentContainer sc, ReadableQueryConfig qc if (relevantExpressions.isEmpty()) { LOGGER.debug("No relevant expressions in {} for query {}", this.getClass().getSimpleName(), sc.toString()); + LOGGER.debug("In this class: {}, {}", this.getSupportedOperators(), this.getAttributes()); return Collections.emptyList(); }