The lucene index only needs loading once if it is backed by a disk
directory. The same with RDF data : if you use, say TDB, then no need
to reload each time. Just connect the Lucene index to the dataset with
TextIndex textIndex = TextDataset.createLucene(...)
TextDataset.create(Dataset base, TextIndex textIndex)
Maybe if you show the setup, we can say something more specific.
Andy
On 27/09/17 18:34, Alex Vasinca wrote:
Hi,
Me and my team are currently developing an application involving Jena.
We’re using Jena-Text together with Lucene indexing for full text search
support but we’re doing it through SPARQL queries. However, on every
startup of the app the indexing is done all over again even if the data
didn’t change.
Is there any way to re-use the already built index and get a Dataset object
from it?
I have to mention that, as we use SPARQL queries for the search, we need a
Dataset object, that we can successfully get from the TextDatasetFactory
class with the TextDatasetFactory#create(Dataset base, TextIndex textIndex)
method but this method triggers the indexing if we stop the app and the
start it again.
I hope you can understand the use case I’m targeting from the above
explanation.
Cheers,
Alex
Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
10