2009-12-19 49 views
0

我有兩個表:Solr的關係型數據庫錯誤

threads: id, title 

posts: id, thread_id, body 

我希望文檔包含線程和屬於它的所有信息。爲什麼不能正常工作:

<document> 
    <entity name="threads" 
      query="select id, title from threads"> 
         <field column="title" name="threads.title"/> 
         <entity name="posts" 
             query="select id, thread_id, body from posts where thread_id='${threads.id}'"> 
             <field column="id" name="posts.id"/> 
             <field column="thread_id" name="posts.thread_id"/> 
             <field column="body" name="posts.body"/> 
         </entity> 
    </entity> 

</document> 

它表示總行數據獲取是228,但它告訴已添加0個文檔。這是爲什麼?

回答

1

當我看到這個問題時,通常是索引錯誤。不幸的是,DIH並不總是容易地將錯誤信息吸引到你可以看到的地方!