This content has been marked as final. Show 3 replies
When new triples are added to a model that was used for creation of the rules index, the status of the rules index is changed from 'VALID' to 'INCOMPLETE'. Queries can continue to be executed, as long as the SEM_MATCH query passes in a status of 'INCOMPLETE'. Similarly when triples are deleted the rules index status is changed to 'INVALID' and again queries can execute as long as SEM_MATCH passes in a status of 'INVALID'. In other words, queries can continue after inserts or deletes as long as the application is aware that the query results will not reflect entailment changes due to the triple inserts/deletes. If the triple inserts/deletes are to a model that is not part of the rules index then the rules index status remains unchanged (it will be 'VALID').
Section 1.6 in the documentation contains more details on this.
Re-creation of the rules index does re-use a lot of information so it is not like re-creating it from scratch. Users typically run the the rules index creation process periodically depending on the frequency of updates. For example, nightly runs are a common usage scenario.
Incremental maintenance and backward chaining are planned for the future.
Is there an easy way allow incomplete or invalid rulesets for queries from the Jena Adaptor API?
Actually, you can use some of the constant QueryOptions objects defined in Jena Adaptor.
Attachment attachment = Attachment.createInstance(model2, "RDFS", InferenceMaintenanceMode.NO_UPDATE,. QueryOptions.ALLOW_QUERY_INCOMPLETE);
Also, there is this QueryOptions.ALLOW_QUERY_INVALID, ALLLOW_QUERY_VALID_AND_DUP,
ALLOW_QUERY_INCOMPLETE_AND_DUP, etc. Please refer to the Javadoc.