What these lines are doing is creating a blank index, in particular the last 
line simply associates a pre-existing index with a dataset i.e. It doesn’t 
actually cause indexing to happen, typically you would first build a persistent 
Lucene index using the command line tool

http://jena.apache.org/documentation/query/text-query.html#building-a-text-index

 if you want to explicitly built the index from code your best bet is to refer 
to the code for the commandline tool:

https://github.com/apache/jena/blob/master/jena-text/src/main/java/jena/textindexer.java

Rob

On 07/04/2017 04:07, "Dimov, Stefan" <[email protected]> wrote:

    Resource res = ResourceFactory.createProperty("http://ao.com/name/";);
    EntityDefinition entDef = new EntityDefinition("uri", "text", res) ;
    Directory dir =  new RAMDirectory();
    Dataset indexDataset = TextDatasetFactory.createLucene(ds, dir, entDef, 
null);




Reply via email to