sebferre / sparklis

Sparklis is a query builder in natural language that allows people to explore and query SPARQL endpoints with all the power of SPARQL and without any knowledge of SPARQL.
Apache License 2.0
41 stars 10 forks source link

Alert error when selecting a concept #3

Closed Aricha9801 closed 3 years ago

Aricha9801 commented 3 years ago

Hi, when I try some endpoints on Sparklis it always alert an error 'The query was not understood by the SPARQL endpoint...'. And here is the steps to trigger this problem:

  1. I set the endpoint to BAG datasets, and select the concept 'pand', now the sentence is 'give me every pand'. link
  2. Then I got the results of that query, but it alert that error, and the corresponding relations of that concept didn't pop up. There should be relations like " has an geometry of", but instead there are only some basic relations here.
  3. To continue the query, I select a relation 'that has a type'.
  4. Now I click the 'pand' in the sentence, this time the corresponding relations appear, I am able to select 'that has a geometry' to continue the query. link

When I got that error I checked the query at console, but it is a very complicated query with many UNION, which is not understandable.

sebferre commented 3 years ago

Hi, thanks for the detailed report.

After investigation, I found that this comes from a query size limit on the endpoint. If you set the maximum number of results down to 100 (in Configuration > Endpoint and queries), it works. When you add the relation 'that has a type', there are twice less retrieved entities as each entity has two types, and hence counts as two results. This is why it works in the second case.

The query is indeed complex, it is designed to get a fairer set of relations from the small sample of entities. One thing I could do would be to add a configuration element to fallback on a simpler query.

Aricha9801 commented 3 years ago

Hi, thanks very much for the answer! It works well for me after changing the results number to 100.

sebferre commented 3 years ago

Closing the issue as it can be solved by playing with the configuration options.