solr导入了多个entity,如何指定一个entity查询全部呢?

ccubee 2017-12-29 05:29:35
经过资讯, 查到了这个

If you have defined an Entity for each table as well as a Combined one, you can add an identifier to each of the entity and use that identifier to filter the results.
e.g.
Add a field type to each entity with fixed values as PERSON, LOCATION CITY ....
And for queries use fq=type:PERSON to filter the results for the specific entity.

但是如何给entity添加字段,并添加固定值没搞明白,请问该怎样添加字段跟固定值呢?
...全文
466 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
ccubee 2018-11-10
  • 打赏
  • 举报
回复
每一个entity 加一个字段用来做标志 比如 user类 每一个数据加一个字段falg: A,person 加字段 flag:B 以此来区分

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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