Hi!

I'm running into problems trying to configure multiple LARQ indexes into the same Fuseki instance. It appears that only one of the indexes is actually used.

This is the simplest test case I could think of:

1. Install Fuseki with LARQ. I used my own instructions [1]. I used yesterday's svn HEAD versions of both LARQ and Fuseki. I had to fix the versions of ARQ and TDB used by LARQ and compile it myself.

2. Start Fuseki with the attached configuration that defines two services (serviceA and serviceB), each with a dataset (datasetA and datasetB) having different TDB and Lucene index locations.

3. Load test data:

A.nt contains this:
<http://example.org/A> <http://www.w3.org/2000/01/rdf-schema#label> "dataset A" .

B.nt contains this:
<http://example.org/B> <http://www.w3.org/2000/01/rdf-schema#label> "dataset B" .

I load these using s-put, like this:

./s-put http://localhost:3030/dsA/data default A.nt
./s-put http://localhost:3030/dsB/data default B.nt

4. Now make sure the Lucene indexes are updated (I wish JENA-164 was fixed some day):

- shut down Fuseki
- rm -r /tmp/lucene*
- start up Fuseki again

5. Verify that the proper data is loaded by executing this query for both dsA and dsB:

SELECT ?label
WHERE { ?s ?p ?label }

I get the expected result, i.e. "dataset A" for dsA and "datasetB" for dsB.

6. Try a query that uses the LARQ index for both dsA and dsB:

PREFIX pf: <http://jena.hpl.hp.com/ARQ/property#>
SELECT ?label
WHERE { ?label pf:textMatch 'dataset' }

Now I get the same result "dataset B" for both dsA and dsB. It appears that both queries go to the same index!

The contents of /tmp/luceneA and /tmp/luceneB appear to be identical w.r.t. file sizes so I believe the indexese were written into the proper places, but the wrong index is used during query time. I haven't double-checked this though.

-Osma

[1] http://code.google.com/p/onki-light/wiki/InstallFusekiLARQ

--
Osma Suominen | [email protected] | +358 40 5255 882
Aalto University, Department of Media Technology, Semantic Computing Research Group Room 2541, Otaniementie 17, Espoo, Finland; P.O. Box 15500, FI-00076 Aalto, Finland
@prefix :        <#> .
@prefix fuseki:  <http://jena.apache.org/fuseki#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .

[] rdf:type fuseki:Server ;
   fuseki:services (
     <#serviceA>
     <#serviceB>
   ) .

<#serviceA> rdf:type fuseki:Service ;
    fuseki:name                        "dsA" ;
    fuseki:serviceQuery                "sparql" ;
    fuseki:serviceReadWriteGraphStore  "data" ;
    fuseki:dataset                     <#datasetA> ;
    .

<#serviceB> rdf:type fuseki:Service ;
    fuseki:name                        "dsB" ;
    fuseki:serviceQuery                "sparql" ;
    fuseki:serviceReadWriteGraphStore  "data" ;
    fuseki:dataset                     <#datasetB> ;
    .

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

<#datasetA> rdf:type      tdb:DatasetTDB ;
    tdb:location "/tmp/tdbA" ;
    ja:textIndex "/tmp/luceneA" .

<#datasetB> rdf:type      tdb:DatasetTDB ;
    tdb:location "/tmp/tdbB" ;
    ja:textIndex "/tmp/luceneB" .

Reply via email to