关于 Solr 你懂的

写代码写出法拉利 2014-03-17 05:44:03
先上 data-config.xml 内容
---------

<?xml version="1.0" encoding="utf-8"?>
<dataConfig>
<dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/test"
user="root"
password="root"/>
<document name="cms">
<entity name="view_blog" pk="id" query="select id,title,content from infos"
deltaQuery="select id,title,content from infos where last_modified > '${dataimporter.last_index_time}'" >
<field column="id" name="id" />
<field column="title" name="title" />
<field column="content" name="content" />
</entity>
<entity name="view_user" pk="uid" query="select uid,name,address from users where uid > 1"
deltaQuery="select uid,name,address from users where uid > 1 and last_modified > '${dataimporter.last_index_time}'" >
<field column="uid" name="uid_a" />
<field column="name" name="name_a" />
<field column="address" name="address_a" />
</entity>
</document>
</dataConfig>

----------------------

主要我想问下 solr 支持多列表查询吗? 我说的是 这个 entity 之间没有关联的列表, 例如我这里,上面的是用户表,下面的是信息表, 它们是单独的查询, 在用户页面里访问用户entity, 在信息页面里访问信息entity。 如果可以, 那么我在 http://127.0.0.1:8080/solr/collection1/select?q=*%3A*&wt=json&indent=true 这个查询时,怎么指定 entity 是哪个? 我现在查询只能查到一个表的。 当然有 .net 的例子最好了, 我用的是 SolrNet 库
...全文
90 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

10,613

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 其他
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧