双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

关于 Solr 你懂的

写代码写出法拉利 写代码写出法拉利 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
先上 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 库
...全文
评论
收藏 已收藏
分享
返回顶部
写代码写出法拉利
其他 10,612 成员 29,026 内容