Building Relationships between documents?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Building Relationships between documents?

lilalfyalien
Hi,

I think I have a very easy question to answer (I am a Lucene beginner and like it very much!): I have built lucene documents and indexes from a dataset from a relational database. I have the table Entities and the table Products. Each product has one entity and Entities therefore can have multiple products. I want my user to be able to search Entity-level attributes but get the product level data back. Is the only way to do this to put all the Entity level data in the same document as the product or can you establish relationships between documents using queries?

Thanks you for reading this and thansk for any help in advance!

Lilalfyalien
Reply | Threaded
Open this post in threaded view
|

Re: Building Relationships between documents?

chrislusf
If you want to do it in just one search, yes, you have to put the Entities
attributes into the documents.
But you can search twice. The second time using values from the first
search, say entitiy_id, to search the products.

--
Chris Lu
-------------------------
Instant Scalable Full-Text Search On Any Database/Application
site: http://www.dbsight.net
demo: http://search.dbsight.com
Lucene Database Search in 3 minutes:
http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes
DBSight customer, a shopping comparison site, (anonymous per request) got
2.6 Million Euro funding!

On Tue, Sep 9, 2008 at 4:10 AM, lilalfyalien <[hidden email]> wrote:

>
> Hi,
>
> I think I have a very easy question to answer (I am a Lucene beginner and
> like it very much!): I have built lucene documents and indexes from a
> dataset from a relational database. I have the table Entities and the table
> Products. Each product has one entity and Entities therefore can have
> multiple products. I want my user to be able to search Entity-level
> attributes but get the product level data back. Is the only way to do this
> to put all the Entity level data in the same document as the product or can
> you establish relationships between documents using queries?
>
> Thanks you for reading this and thansk for any help in advance!
>
> Lilalfyalien
> --
> View this message in context:
> http://www.nabble.com/Building-Relationships-between-documents--tp19390096p19390096.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Building Relationships between documents?

Erick Erickson
In reply to this post by lilalfyalien
You must get your head out of the RDBMS world when
using lucene <G>. There's nothing in Lucene that
expresses relationships like a db. The usual solution is
to de-normalize your database at index time so you can
do reasonably simple searches that express your desired
relationship...

Best
Erick

On Tue, Sep 9, 2008 at 7:10 AM, lilalfyalien <[hidden email]> wrote:

>
> Hi,
>
> I think I have a very easy question to answer (I am a Lucene beginner and
> like it very much!): I have built lucene documents and indexes from a
> dataset from a relational database. I have the table Entities and the table
> Products. Each product has one entity and Entities therefore can have
> multiple products. I want my user to be able to search Entity-level
> attributes but get the product level data back. Is the only way to do this
> to put all the Entity level data in the same document as the product or can
> you establish relationships between documents using queries?
>
> Thanks you for reading this and thansk for any help in advance!
>
> Lilalfyalien
> --
> View this message in context:
> http://www.nabble.com/Building-Relationships-between-documents--tp19390096p19390096.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>