[siren-user] N-Tuples syntax
Renaud Delbru
renaud.delbru at deri.org
Mon Dec 27 11:28:59 GMT 2010
Hi Dario,
On 27/12/10 10:30, Dario Rigolin wrote:
> Hi, I'm looking how N-Tuples syntax works and how to describe a metadata tree
> like I have in mind. My search on web bring me to RDF examples and I still not
> understanding very well. I played with samples but I was able to store "one
> level"... If anybody can translate to N-Tuples my following samples I will
> appreciate a lots...
It looks like, based on your example, that you are trying to index XML
data with SIREn.
SIREn indexing technique is based on XML IR technique, and therefore can
index some tree-based data structure, but with depth limitations (2).
Therefore, it is not possible to index complex tree with long branch.
However, you can denormalise your tree and index certain relations.
The N-Tuple syntax is just a syntax to "structure" your input data into
a format that SIREn can understand. In fact, on a more abstract level,
you can use SIREn to index tabular data into one Lucene's field, with an
unlimited number of rows and columns (a n-tuple being a row of the
table). The table can be uses in different ways to structure your data.
I will propose a index schema based on your example.
> Sample "structured Record"
> Name= Dario
Original Lucene's field 'name'
> Age=34
Original Lucene's field 'age'
> Address (attribute prefferedAddress=true)
> Type=Home
> Street = My Street 25
> City= My City
> Country= My Country
> Address (attribute prefferedAddress=false)
> Type=Work
> Street = My Work Street 25
> City= My Work City
> Country= My Country
SIREn's field using tabular format:
- field name: address
- one row represents one address
- one column represents one attribute of an address -> 4 columns: type,
street, city, country
> Friends
> Person
> Name=Pippo
> Person
> Name=Pluto
> Address=An Address
> Company
> Name=Oracle
SIREn's field using tabular format:
- field name: friends
- one row represents one friend
- one column represents one attribute of a friend -> 3 columns: type,
name, address
Using this schema, you can ask queries such as:
"retrieve me all people with age=34, working in New York, and having a
friend named 'pippo'.
I hope this answers your questions, feel free to ask more clarification.
Kind Regards, and happy xmas ;o).
--
Renaud Delbru
More information about the siren
mailing list