[ 
https://issues.apache.org/jira/browse/JENA-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028743#comment-13028743
 ] 

Paolo Castagna edited comment on JENA-63 at 5/4/11 1:53 PM:
------------------------------------------------------------

To enable and use LARQ from Fuseki, simply point to the Lucene index location 
using ja:textIndex property:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .

[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .

<#dataset> rdf:type tdb:DatasetTDB ;
  tdb:location "/path/to/tdb/indexes/" ;
  ja:textIndex "/path/to/lucene/index/" ;
  .

Also, I think there is a bug in FusekiCmd which cases the assembler code to 
initialize a Dataset twice. This causes problems with Lucene which is failing 
to lock the index directory the second time.

Index: src/main/java/org/openjena/fuseki/FusekiCmd.java
===================================================================
--- src/main/java/org/openjena/fuseki/FusekiCmd.java    (revision 8763)
+++ src/main/java/org/openjena/fuseki/FusekiCmd.java    (working copy)
@@ -183,12 +183,6 @@
                 throw new CmdException(argPort.getKeyName()+" : bad port 
number: "+portStr) ;
             }
         }
-        else
-        {
-            Dataset ds = modDataset.createDataset() ;
-            if ( ds != null )
-                dsg = ds.asDatasetGraph() ;
-        }
             
         if ( dsg == null )
             throw new CmdException("No dataset defined: "+argUsage) ;


      was (Author: castagna):
    To enable and use LARQ from Fuseki, simply point to the Lucene index 
location using ja:textIndex property:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .

[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .

<#dataset> rdf:type tdb:DatasetTDB ;
  tdb:location "/path/to/tdb/indexes/" ;
  ja:textIndex "/path/to/lucene/index/" ;
  .
  
> Add LARQ to TBD and Fuseki
> --------------------------
>
>                 Key: JENA-63
>                 URL: https://issues.apache.org/jira/browse/JENA-63
>             Project: Jena
>          Issue Type: Improvement
>          Components: Fuseki, LARQ, TDB
>            Reporter: Paolo Castagna
>         Attachments: TDB-r8763.patch
>
>
> It is possible (although not easy for users) to use LARQ with TDB and Fuseki.
> This is to make possible and easy to use LARQ with TDB datasets and with 
> Fuseki.
> One way to achieve this is to improve DatasetAssemblerTDB in TDB as suggested 
> by http://markmail.org/thread/r5phyiuqkqsyi2xc. This way, LARQ will be loaded 
> and wired into ARQ if present in the classpath. Uses will need just to add 
> the LARQ jar to their classpath (or depend on it if they use Maven).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to