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 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:
>
> query="select * from threads, tags, thread_tag_map where
> thread_tag_map.thread_id = threads.id AND thread_tag_map.tag_id = tags.id">
>
>
> 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!