[bug]java.lang.IllegalArgumentException: no patterns have been provided


in the visualizer I can do "match $a; offset 0; limit 100;"
but only when inference is not activated

if I activate inference and do “match $a; offset 0; limit 100;” I get java.lang.IllegalArgumentException: no patterns have been provided in match query. at least one pattern must be provided


Hello John,

Yes, it is a bug, we should handle this case more gracefully. That being said the practicality of this query in the context of graql inference, other than a sanity check, is somewhat limited.

The native graql inference mechanism is a goal-driven one (backward-chaining) and is geared towards providing a complete answer to a specific query at a run-time. This is motivated by the less data - more information approach present in semantic search engines for instance. The basic idea of this approach is to return fewer answers but ones that are immediately relevant and meaningful. When we start thinking about generic queries and patterns where the match $x is the most generic one (return everything), we lean towards batch/incremental forward-chaining operation and deviate from both the run-time response as well as the knowledge-centric approach. Goal-oriented inference for general queries is possible in graql, however, in this specific case the lack of patterns in the query obfuscates the meaning of the results as no context is provided for the returned answers to be interpreted within.

Hope that helps