【问题标题】:solr relational database errorsolr 关系数据库错误
【发布时间】: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


    【解决方案1】:

    当我看到这个问题时,通常是索引错误。不幸的是,DIH 并不总是轻易地将错误消息冒泡到您可以看到的地方!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-11
      • 1970-01-01
      • 1970-01-01
      • 2021-03-01
      • 1970-01-01
      • 2015-06-11
      相关资源
      最近更新 更多