You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Magne Skjeret <ma...@broadpark.no> on 2005/07/25 16:40:51 UTC

Relations between documents

Hi

I have been reading around a bit on the net to find a solution for my
problem, but no luck yet. I am pretty sure it can be done, but I haven't
found out how yet.

My problem is that I have relations between documents.

E.g
   Survey --> Variables

   Each survey can have loads of variables, and I want to be able to run
queries like this:

Get Survey where Variable.label contains 'gender'
Get Variable where Survey.abstract contains 'cancer'

Is this possible to do this in the index? Or does it belong in the query?

If anyone has some comments on best practice or other comments I would
very much appreciate hearing about them.

Magne Skjeret








---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Relations between documents

Posted by Chris Lu <ch...@gmail.com>.
Then your lucene Document can be:

Survey + n Variables,

The idea is just to put everything related to a combined Document, and
search on it.

-- 
Chris Lu
---------------------
Full-Text Search on Any Database
http://www.dbsight.net


On 7/25/05, Magne Skjeret <ma...@broadpark.no> wrote:
> Chris Lu wrote:
> 
> >Maybe you can have one Document = Survey+Variable,
> >and have fields like "abstract", "label".
> >
> >Just search on the combined documents.
> >
> >
> Hi
> 
> A Survey can have 100's of variables. That means that the Survey part is
> duplicated N variable times.
> Or did I misunderstand you?
> 
> Magne
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Relations between documents

Posted by Magne Skjeret <ma...@broadpark.no>.
Chris Lu wrote:

>Maybe you can have one Document = Survey+Variable,
>and have fields like "abstract", "label".
>
>Just search on the combined documents.
>  
>
Hi

A Survey can have 100's of variables. That means that the Survey part is
duplicated N variable times.
Or did I misunderstand you?

Magne


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Relations between documents

Posted by Chris Lu <ch...@gmail.com>.
Maybe you can have one Document = Survey+Variable,
and have fields like "abstract", "label".

Just search on the combined documents.

-- 
Chris Lu
---------------------
Full-Text Search on Any Database
http://www.dbsight.net


On 7/25/05, Magne Skjeret <ma...@broadpark.no> wrote:
> Hi
> 
> I have been reading around a bit on the net to find a solution for my
> problem, but no luck yet. I am pretty sure it can be done, but I haven't
> found out how yet.
> 
> My problem is that I have relations between documents.
> 
> E.g
>    Survey --> Variables
> 
>    Each survey can have loads of variables, and I want to be able to run
> queries like this:
> 
> Get Survey where Variable.label contains 'gender'
> Get Variable where Survey.abstract contains 'cancer'
> 
> Is this possible to do this in the index? Or does it belong in the query?
> 
> If anyone has some comments on best practice or other comments I would
> very much appreciate hearing about them.
> 
> Magne Skjeret
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org