From a52a17eb030cbfd7575d3695c576c345db4cf9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20R=C3=B6der?= Date: Fri, 20 Sep 2024 14:17:43 +0200 Subject: [PATCH] Added a dummy triple into the FILTER of the count query to ensure that Tentris executes it correctly. --- .../cel/refine/suggest/SparqlBasedSuggestor.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/dice_research/cel/refine/suggest/SparqlBasedSuggestor.java b/src/main/java/org/dice_research/cel/refine/suggest/SparqlBasedSuggestor.java index e702427..4271594 100644 --- a/src/main/java/org/dice_research/cel/refine/suggest/SparqlBasedSuggestor.java +++ b/src/main/java/org/dice_research/cel/refine/suggest/SparqlBasedSuggestor.java @@ -493,7 +493,10 @@ protected String createNotExistsFilter(ClassExpression context, String instanceV for (ClassExpression expression : expressions) { SparqlBuildingVisitor visitor = new SparqlBuildingVisitor(filterBuilder, "?pos", null, null, null); visitor.setIntermediateVariableName("?y"); - filterBuilder.append("FILTER NOT EXISTS { "); + filterBuilder.append("FILTER NOT EXISTS { \n "); + // We have to add a dummy triple + filterBuilder.append(instanceVariable); + filterBuilder.append(" a . \n"); expression.accept(visitor); filterBuilder.append(" }\n"); }