KnowledgeCaptureAndDiscovery / DISK-API

Apache License 2.0
3 stars 1 forks source link

Hypothesis pattern breaks and freezes the whole system #78

Open mosoriob opened 1 year ago

mosoriob commented 1 year ago

Describe the bug

The SPARQL query generated by the following hypothesis pattern is too heavy. (117,649 entries)

PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX disk: <http://disk-project.org/ontology/disk#>
PREFIX sqo: <https://w3id.org/sqo#>
PREFIX hyp: <http://disk-project.org/ontology/hypothesis#>
PREFIX neuro: <https://w3id.org/disk/ontology/enigma_hypothesis#>

SELECT DISTINCT * 
FROM <http://endpoint.mint.isi.edu/temp/data/>
WHERE { 
?goal hyp:associatedWith ?WeatherSensor1.
?goal hyp:associatedWith ?WeatherSensor2.
?goal hyp:associatedWith ?WeatherSensor3.
?goal hyp:associatedWith ?WeatherSensor4.
?goal hyp:associatedWith ?WeatherSensor5.
?goal hyp:associatedWith ?WeatherSensor6.
}

Problems:

  1. The query doesn't end because ontapi doesn't support timeout
  2. If the query ends, generate 117,649 matches.