【发布时间】:2009-12-19 16:25:06
【问题描述】:
我有两张桌子:
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 个文档。这是为什么呢?
【问题讨论】:
标签: database solr full-text-search