[siren-user] NTriplesIndexing.java example

Renaud Delbru renaud.delbru at deri.org
Fri Nov 12 09:10:20 GMT 2010


  Hi Mike,

indeed there is a small bug in the NTripleIndexing demo (and I think it 
could be present also in the Entity and Tabular indexing demo as well).
The problem is that we changed the TupleAnalyzer and the URI 
normalisation configuration. Now, by default, the TupleAnalyzer does not 
perform any URI normalisation, and therefore the query in 
NTripleIndexing demo which relies on URI tokenisation does not work.

A quick fix is to configure the URI normalisation for the tuple analyzer:

   public NTriplesIndexing()
   throws CorruptIndexException, LockObtainFailedException, IOException {
     dir = new RAMDirectory();
     final TupleAnalyzer analyzer = new TupleAnalyzer();
     analyzer.setURINormalisation(URINormalisation.LOCALNAME);
     writer = new IndexWriter(dir, analyzer, MaxFieldLength.UNLIMITED);
     reader = IndexReader.open(dir, true);
   }

I have opened a JIRA issue [1]. The fix will be present in siren 0.2.1.

[1] https://dev.deri.ie:8443/jira/browse/SRN-87

Thanks for your feedbacks.
-- 
Renaud Delbru

On 11/11/10 23:13, Mike Hugo wrote:
> I'm trying the NTriplesIndexing.java example included in the 0.2.0 
> distribution and I'm not getting the results I am expecting.
>
> The output provided is:
>
> Number of hits: 1
> 0: 
> Document<stored,indexed,omitNorms<url:/opt/java/siren-0.2.0/./src/test/resources/demo/ntriples/foaf1.nt>>
> 2.0611486
> Number of hits: 0
> Number of hits: 0
> Number of hits: 0
>
> In looking at the queries that should be generating the output for the 
> last three lines, I would expect to see some hits from those queries. 
>  Is the output I show above the expected output of the example?  I'm 
> attaching the example code for quick reference (but you can get the 
> same thing by downloading the 0.2.0 release from 
> http://siren.sindice.com/resources/releases/siren-0.2.0-assembly.tar.gz)
>
> Thanks for your help,
>
> Mike
>
>
> _______________________________________________
> siren mailing list
> siren at lists.deri.org
> http://lists.deri.org/mailman/listinfo/siren



More information about the siren mailing list