The blank node (1) just means I don't care what the subject is (it will match a blank node or a URI-identified resource - it cannot be a literal as it's in subject position), just that it's the centre of the molecule and has a name attached to it.

I'm not sure you can set the parameters and build the index (2) all within one update/transaction.

Barry


On 06/02/13 01:49, Siow Boon Lin Eugene wrote:
Hi,

Thanks for the reply Barry!
I could not get this to work.

1.
SELECT ?name
{[] luc:myIndex "eugene male"; :hasName ?name}

Why the bnode?
The OWLIM documentation states using ?o luc:myIndex "eugene" and ?o is a 
literal. Here the bnode is E1?

2. So this will only work with molecule size of 2? I suspected it could be a 
problem with my index, so I included my update query that created the index.

PREFIX luc:<http://www.ontotext.com/owlim/lucene#>
INSERT DATA {
        luc:moleculeSize luc:setParam "2".
        luc:index luc:setParam "literals, bnodes".
        luc:myIndex luc:createIndex "true".
}

I am not using any bnodes, however, I included it in case this was necessary to 
do the query you provided.

So I tried this with a variety of options to see if the size of my index will 
change in 'AppData/OpenRDFSesame/repositories/repo/storage/lucene'
If I change the molecule size to 3 or 4, the size of the index does not change, 
which is strange.
If I choose bnodes alone it reduces from 80mb to 60mb.
If I choose literals and bnodes, literals alone, with moleculesize 2, 3,4 - the 
index remains at 80mb.

Am I doing anything wrong during the index creation?

Regards,
Eugene

--------------------------------------------------

The beauty of the Lucene search is that you can combine it with graph patterns, 
e.g. (presuming you created myIndex):

SELECT ?name
{[] luc:myIndex "eugene male"; :hasName ?name}

Barry



On 04/02/13 09:00, Siow Boon Lin Eugene wrote:
Hi,

As I understand, when I create the Lucene index, I create RDF
molecules and if I have specified a molecule size of 2, this means it
will index the surrounding nodes till 2 hops away from the literal.

Is this right?

As such, is it possible to use proximity in Lucene search to do
something like this:

Suppose I have:

?s | ?p | ?o

E1 | hasName | "Eugene"

E1 | hasGender | "Male"

Can I use this Lucene query "eugene male"~2 and retrieve the ?o "Eugene"?

If not, what would be a good way to do this to exploit the properties
of the RDF molecule.

Thanks!

Eugene



_______________________________________________
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://ontomail.semdata.org/pipermail/owlim-discussion/attachments/20130204/d80eb106/attachment-0001.html>

------------------------------

_______________________________________________
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion


End of Owlim-discussion Digest, Vol 13, Issue 3
***********************************************
_______________________________________________
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion

_______________________________________________
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion

Reply via email to