Sorry I can’t It is not a component of the software I use myself, I’m just aware that the specific issue you encounter exists. Yes, the documentation is probably lacking in this regard. Hopefully others who do work with this component may be able to provide some help
Rob On 18/10/2017 21:07, "Dimov, Stefan" <[email protected]> wrote: Thanks Rob, Can you, please, give me more specific example, suited for my particular case? I find the documentation hard to follow. Regards, Stefan On 10/18/17, 2:11 AM, "Rob Vesse" <[email protected]> wrote: Your current code simply creates a Lucene backed index with your desired configuration but it doesn’t actually populate the index. You have to explicitly populate the index first either with the command line tool or by manually building the index from code similar to how the command line tool does it: https://github.com/apache/jena/blob/master/jena-text/src/main/java/jena/textindexer.java#L106 Rob On 18/10/2017 02:54, "Dimov, Stefan" <[email protected]> wrote: Hello, I have an existing (persisted) TDB and I’m starting Fuseki like this: Location location = Location.create("tdb"); ds = TDBFactory.createDataset(location); FusekiServer fs = FusekiServer.create() .add("/ds", ds) .build(); fs.start(); I want to create a (persisted) index from it for specific subject like this: EntityDefinition entDef = new EntityDefinition("uri", "text", "graph") ; Resource res = ResourceFactory.createProperty(“http:/ao.com/name”); entDef.setPrimaryPredicate(res); Path path = Paths.get("lucene_index"); Directory dir = FSDirectory.open(path); ds = TextDatasetFactory.createLucene(ds, dir, entDef, null); So, the code looks like this: Location location = Location.create("tdb"); ds = TDBFactory.createDataset(location); EntityDefinition entDef = new EntityDefinition("uri", "text", "graph") ; Resource res = ResourceFactory.createProperty(“http:/ao.com/name”); entDef.setPrimaryPredicate(res); Path path = Paths.get("lucene_index"); Directory dir = FSDirectory.open(path); ds = TextDatasetFactory.createLucene(ds, dir, entDef, null); FusekiServer fs = FusekiServer.create() .add("/ds", ds) .build(); fs.start(); and the dataset is getting loaded, but no index is getting created. What am I doing wrong? S.
