摘要: 基于Solr的大数据检索引擎(跨表检索),对多个Core进行检索。。。
博客来源于:讯杰设计网:http://blogs.51diysoft.com/blogs
需要注意的是两个Core的查询的字段必须是都有的,否则会提示undefined错误,其实solr跟数据库差不多,有字段、类型、查询语句(AND OR)等等
Solr的多表检索,单个字段时数量是累加的,多个字段的query查询出来数据不准确?
查询语句:查询标题包含国的 的语句参数为 q=Title_C:国*
跨表的核心url参数,http的多个地址,逗号分隔:shards=http://127.0.0.1:8080/solr/AAA,http://127.0.0.1:8080/solr/BBB
单个字段:
【跨表 5条数据】
http://127.0.0.1:8080/solr/AAA/select?shards=http://127.0.0.1:8080/solr/AAA,http://127.0.0.1:8080/solr/BBB&indent=on&q=Title_C:国*&wt=json
【AAA 2条数据】
http://127.0.0.1:8080/solr/AAA/select?indent=on&q=Title_C:国*&wt=json
【BBB 3条数据】
http://127.0.0.1:8080/solr/BBB/select?indent=on&q=Title_C:国*&wt=json
-------------------------------------------------------------
SolrCloud初识
图文并茂参考:https://www.cnblogs.com/saratearing/p/5690476.html
shards分布式请求:
http://lucene.apache.org/solr/guide/7_2/distributed-requests.htm