Knowledge base index

Fulltext index


QLever UI is generating the index ...

Please wait until this process is finished..

QLever UI Help:

ctrl + space Invoke auto suggestions
ctrl + enter Send query to backend
or Search through suggestions
enter Chose the selected suggestion
esc Close suggestion window
tab Jump to the next placeholder


The basic template of a SPARQL query as suggested by the UI initially looks like this:

  [subject] [predicate] [object] .
  [subject] [predicate] [object] .
Please note the following hints:
  • You may need to add a prefix depending on your data set. If prefixes are available in your source they will be suggested by our UI automatically.
  • You should end lines in where clause with dots - otherwise QLever does not know that you want to connect those two lines with an AND operation.
  • DISTINCT, LIMIT and ORDER BY are optional - you don't need to add them to your query if not necessary.
Autosuggestions are made based on your position inside the query and the input you currently type. QLever UI evaluates the query you wrote in order to make context sensitive suggestions which leads to less but more relevant suggestions. Suggestions are usually ordered by their occurrence frequency. A small badge on the current lines indicates the amount of records that matches.

If you get no suggestions that might have different reasons:
  • There are no keywords or data points that match the word your are currently typing
  • The evaluation of your existing query indicates that there will be no matches
  • You have a syntax error in you query (e.g. miss a dot at the end of a line)
  • Your QLever backend or your internet connection has gone away and does not respond anymore. This is usually indicated by a red cross on the line.
As soon as your query contains at least a standard template (as suggested by the UI) you can easily switch through placeholder positions by using the TAB key.

This will help you to easily navigate through your code and add lines, variables and limits / ordering without navigating with your mouse or your arrow pane.
When your backend contains fulltext data (you can check in the statistics pane) you can use the fulltext search features of QLever. You can make use of them by writing a query like this:

SELECT ?person TEXT(?c) SCORE(?c) WHERE {
  ?c ql:contains-entity ?person .
  ?c ql:contains-word "land* moon"
In this example ?person represents the entity (subject) you filter for and ?c represents the text pattern.

Note the following features:
  • A star * can be used to search for a prefix as done in the keyword walk*. Note that there is a min prefix size depending on settings at index build-time.
  • SCORE can be used to obtain the score of a text match. This is important to achieve a good ordering in the result. The typical way would be to ORDER BY DESC(SCORE(?c)).
  • Where ?c just matches a text record Id, TEXT(?c) can be used to extract a snippet.
  • TEXTLIMIT can be used to control the number of result lines per text match. The default is 1.
Be aware that there are some limitations when using QLever / QLever UI because we do not support the full SPARQL specification as published by the W3C at the moment.

Features you may use:

Full-text search features added by QLever:
  • ql:contains-[entity|word]
  • TEXT()
  • SCORE()

Not supported yet:
  • There is no support for grouping, assignments and aggregation in QLever at the moment
  • There is also no support for subqueries and describing features (DESCRIBE / ASK)
  • You cannot not use the functional expressions and SPARQL algebra right now