This matches my results as well. If the TextDataset wraps a model, and triples are added to such model causing an update to the base data, your query works.
Nicola Il giorno ven 1 mag 2020 alle ore 11:21 Andy Seaborne <a...@apache.org> ha scritto: > (Sorry for the delay) > > On 28/04/2020 16:47, Nouwt, B. (Barry) wrote: > > Hi all, I have a short question about the Lucene Index that can be > integrated with an Apache Jena Dataset ( > https://jena.apache.org/documentation/query/text-query.html#). > > > > Would inferred triples (by a forward GenericRuleReasoner) also get > indexed by the Lucene index? > > I don't think so in the general case. > > The inferred triples are kept separately from the base graph so the > configuration of the base as having a text index is not used. (Maybe > someone can correct me here - it would be good if it were otherwise.) > > A special case might be if the inferred triples use literals already in > the base data, then they are indexes via the base graph so the pattern > > ## In the base graph > (?s ?score ?literal) text:query (rdfs:label 'word') ; > ## In the inference graph > ?x rdfs:label ?literal . > > might ( I have not tried it) help. > > It does the search then looks up the ?literal found which could drive > the rule's machinery. > > For forward rules producing triples, the inferences could be > materialised and then indexed separately. > > Andy > > > > > Regards, Barry >