New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(triplestores): Support Apache Jena Fuseki #1375
Conversation
Do you want me to help implement Sparql templates for v2 and also for Gravsearch? |
I've done most of it already, but yes, thanks, I could use some help. Lucene searches aren't working yet with Fuseki. Could you run Here's how to test it:
<role rolename="manager-gui"/>
<user username="admin" password="root" roles="manager-gui"/>
Now you should be able to run tests with either GraphDB or Fuseki in SBT like this:
|
# Conflicts: # webapi/src/main/scala/org/knora/webapi/store/triplestore/http/HttpTriplestoreConnector.scala
# Conflicts: # webapi/src/main/scala/org/knora/webapi/responders/admin/ProjectsResponderADM.scala # webapi/src/main/scala/org/knora/webapi/store/triplestore/http/HttpTriplestoreConnector.scala
This pull request has been mentioned on Discuss DaSCH. There might be relevant details there: https://discuss.dasch.swiss/t/support-for-apache-jena-fuseki/76/1 |
@tobiasschweizer Are you still planning to work on this? |
I think #1379 could be related to this PR |
@tobiasschweizer OK, do you think it would make sense to merge #1379 first, and then see what else needs to be done for Fuseki Lucene support in this PR? |
Yes, that would be ok. But first we need to decide what the API gets as described in https://discuss.dasch.swiss/t/use-lucene-syntax-in-fulltext-search/81. If this changes, then the results of the fulltext search will change. |
you mean you would have to change the function params in Gravsearch? |
Yes. The first parameter should be the text value, not the literal I can do a workaround, but it will be a bit of a hack, because Fuseki needs the text value, not the literal, to do the Lucene search. The better solution would be to change the parameter in Gravsearch. Do you think it's too late to do that? |
@tobiasschweizer Another option: I could deprecate the existing functions, have them throw an exception if you try to use them with Fuseki, and add new functions with different arguments. |
Probably this is something we should discuss regarding release management. |
Talked on the phone with @tobiasschweizer, I'm going to take the deprecation approach. |
@subotic All the tests in |
Note for future development: Jena's reasoner can do forward chaining as well as backward chaining, so we might be able to use it to optimise queries as we do in GraphDB: https://jena.apache.org/documentation/inference/#RULEforward |
DSP-31 |
Looks good. Managed to get Fuseki setup as per your documentation. Started the tests a few minutes ago. |
@subotic thanks, and don't forget this: #1375 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, great work! LGTM.
@subotic Thanks, but did you figure out how to run the Knora-Sipi integration tests with Fuseki? |
The command to start integration tests with the Fuseki config is: I had to make a small change. All integration tests also pass! |
@subotic OK, great, thank you for the review! |
This PR updates and fixes Knora's support for the Apache Jena Fuseki triplestore. Since one of the problems we had with Fuseki seemed to be related to connection handling in the Jetty servlet engine, this PR supports running Fuseki in Apache Tomcat.
updateUser.scala.txt
.getResourcesInProjectPrequery*.scala.txt
so it's deterministic when a resource has more than one value for the sort property, by using only the value with the lowest sort order.getResourcePropertiesAndValues*.scala.txt
by querying all statements whose subject is a nested resource, to simplify the graph pattern.getIncomingReferencesStandard.scala.txt
by using aFILTER
to simplify the graph pattern.searchResourceByLabelStandard.scala.txt
to do the Lucene index search first in each inner scope.knora-api:matchText
andknora-api:matchTextInStandoff
, to replaceknora-api:match
andknora-api:matchInStandoff
, with different parameters so both GraphDB and Fuseki can be supported. The existing functions will be deprecated.knora-api:standoffTagHasStartAncestor
using property path syntax.knora-base:isDeleted
to the end of each block.Postponed:
Needs #1379.
Resolves #1374.
Resolves DSP-27
Resolves DSP-29