lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Serba <ase...@gmail.com>
Subject Re: preserve relational strucutre in solr?
Date Mon, 14 Dec 2009 17:23:37 GMT
http://wiki.apache.org/solr/DataImportHandler#Full_Import_Example

See full import example, it has 1-n and n-n relationships

On Mon, Dec 14, 2009 at 4:34 PM, Faire Mii <faire.mii@gmail.com> wrote:
>
>  was able to import data through solr DIH.
>
> in my db i have 3 tables:
>
> threads: id tags: id thread_tag_map: thread_id, tag_id
>
> i want to import the many2many relationship (which thread has which tags) to my solr
index.
>
> how should the query look like.
>
> i have tried with following code without result:
>
> <entity name="thread_tags"
>        query="select * from threads, tags, thread_tag_map where thread_tag_map.thread_id
= threads.id AND thread_tag_map.tag_id = tags.id">
> </entity>
>
> s this the right way to go?
>
> i thought that with this query each document will consist of tread and all the tags related
to it. and i could do a query to get the specific thread by tagname.
>
>
> thanks!

Mime
View raw message