Hi Jérôme,
you are lucky, I've just exactly the same need as you and I've something about 
it recently.
Unfortunately, the new LARQ (as a separate module) still did not make it into 
Fuseki on trunk.

We have an open JIRA for it which you can watch|vote|contribute to:
https://issues.apache.org/jira/browse/JENA-63

In the meantime, if you want to use LARQ with Fuseki this is what you need to 
do:

cd /tmp
svn co https://svn.apache.org/repos/asf/incubator/jena/Jena2/Fuseki/trunk/ 
fuseki
cd /tmp/fuseki
wget 
https://issues.apache.org/jira/secure/attachment/12482758/JENA-63_Fuseki_r1136050.patch
patch -p0 < JENA-63_Fuseki_r1136050.patch
mvn package

Now, you can simply use the Fuseki config.ttl file as explained here:
http://openjena.org/wiki/Fuseki#Fuseki_Configuration_File
and use the ja:textIndex property on a dataset to specify an non existing 
directory.

LARQ when you point it at a non existing directory will perform the indexing 
for you.
This is particularly useful when you have multiple datasets configured in 
Fuseki.
WARNING: it might take a while to index large datasets, so be patient.

See also: http://markmail.org/thread/tmptip55ru5wxrrj

LARQ snapshots are here:
https://repository.apache.org/content/repositories/snapshots/org/apache/jena/larq/0.2.2-incubating-SNAPSHOT/
and I can quickly fix/improve things if you have problems or good suggestions.

I hope this helps, let me know how it goes.

Paolo

Jérôme wrote:
> Hi,
> 
> i'm trying to use LARQ with my Fuseki server.
> 
> I would like to programmaticaly indexing(with lucene) documents when the
> server starts.
> 
> Something like that:
> 
> Model model = ModelFactory.createDefaultModel();
> IndexBuilderString larqBuilder = new IndexBuilderString();
> model.register(larqBuilder);
> FileManager.get().readModel(model, "Data/books.ttl");
> larqBuilder.closeWriter();
> model.unregister(larqBuilder);
> index = larqBuilder.getIndex();
> LARQ.setDefaultIndex(index);
> 
> Is it possible? In which class it would be the best?
> 
> Thanks
> 
> Jerome
> 
> 
> 

Reply via email to