https://lucene.apache.org/solr/guide/7_2/collapse-and-expand-results.html#collapsing-query-parser

对应的源码实现QParserPlugin

static {HashMap<String, Class<? extends QParserPlugin>> map = new HashMap<>(30, 1);map.put(LuceneQParserPlugin.NAME, LuceneQParserPlugin.class);map.put(FunctionQParserPlugin.NAME, FunctionQParserPlugin.class);map.put(PrefixQParserPlugin.NAME, PrefixQParserPlugin.class);map.put(BoostQParserPlugin.NAME, BoostQParserPlugin.class);map.put(DisMaxQParserPlugin.NAME, DisMaxQParserPlugin.class);map.put(ExtendedDismaxQParserPlugin.NAME, ExtendedDismaxQParserPlugin.class);map.put(FieldQParserPlugin.NAME, FieldQParserPlugin.class);map.put(RawQParserPlugin.NAME, RawQParserPlugin.class);map.put(TermQParserPlugin.NAME, TermQParserPlugin.class);map.put(TermsQParserPlugin.NAME, TermsQParserPlugin.class);map.put(NestedQParserPlugin.NAME, NestedQParserPlugin.class);map.put(FunctionRangeQParserPlugin.NAME, FunctionRangeQParserPlugin.class);map.put(SpatialFilterQParserPlugin.NAME, SpatialFilterQParserPlugin.class);map.put(SpatialBoxQParserPlugin.NAME, SpatialBoxQParserPlugin.class);map.put(JoinQParserPlugin.NAME, JoinQParserPlugin.class);map.put(SurroundQParserPlugin.NAME, SurroundQParserPlugin.class);map.put(SwitchQParserPlugin.NAME, SwitchQParserPlugin.class);map.put(MaxScoreQParserPlugin.NAME, MaxScoreQParserPlugin.class);map.put(BlockJoinParentQParserPlugin.NAME, BlockJoinParentQParserPlugin.class);map.put(BlockJoinChildQParserPlugin.NAME, BlockJoinChildQParserPlugin.class);map.put(CollapsingQParserPlugin.NAME, CollapsingQParserPlugin.class);map.put(SimpleQParserPlugin.NAME, SimpleQParserPlugin.class);map.put(ComplexPhraseQParserPlugin.NAME, ComplexPhraseQParserPlugin.class);map.put(ReRankQParserPlugin.NAME, ReRankQParserPlugin.class);map.put(ExportQParserPlugin.NAME, ExportQParserPlugin.class);map.put(MLTQParserPlugin.NAME, MLTQParserPlugin.class);map.put(HashQParserPlugin.NAME, HashQParserPlugin.class);map.put(GraphQParserPlugin.NAME, GraphQParserPlugin.class);map.put(XmlQParserPlugin.NAME, XmlQParserPlugin.class);map.put(GraphTermsQParserPlugin.NAME, GraphTermsQParserPlugin.class);map.put(IGainTermsQParserPlugin.NAME, IGainTermsQParserPlugin.class);map.put(TextLogisticRegressionQParserPlugin.NAME, TextLogisticRegressionQParserPlugin.class);map.put(SignificantTermsQParserPlugin.NAME, SignificantTermsQParserPlugin.class);map.put(PayloadScoreQParserPlugin.NAME, PayloadScoreQParserPlugin.class);map.put(PayloadCheckQParserPlugin.NAME, PayloadCheckQParserPlugin.class);map.put(BoolQParserPlugin.NAME, BoolQParserPlugin.class);standardPlugins = Collections.unmodifiableMap(map);}

具体如下:

/**The <b>CollapsingQParserPlugin</b> is a PostFilter that performs field collapsing.This is a high performance alternative to standard Solrfield collapsing (with ngroups) when the number of distinct groupsin the result set is high.<p>Sample syntax:<p>Collapse based on the highest scoring document:<p>fq=(!collapse field=field_name}<p>Collapse based on the min value of a numeric field:<p>fq={!collapse field=field_name min=field_name}<p>Collapse based on the max value of a numeric field:<p>fq={!collapse field=field_name max=field_name}<p>Collapse with a null policy:<p>fq={!collapse field=field_name nullPolicy=nullPolicy}<p>There are three null policies: <br>ignore : removes docs with a null value in the collapse field (default).<br>expand : treats each doc with a null value in the collapse field as a separate group.<br>collapse : collapses all docs with a null value into a single group using either highest score, or min/max.<p>The CollapsingQParserPlugin fully supports the QueryElevationComponent**/

转载于:https://www.cnblogs.com/davidwang456/p/10490896.html

Apache Solr 实现去掉重复的搜索结果相关推荐

  1. 利用SOLR搭建企业搜索平台 之八(solr 实现去掉重复的搜索结果,打SOLR-236_collapsing.patch补丁)...

    引用Bory.Chan http://blog.chenlb.com/2009/04/apply-solr-collapsing-patch-remove-duplicate-result.html ...

  2. Apache Solr漏洞总结(比较全面的哦)

    目录 框架概述 Wiki百科 百度百科 漏洞列表 1.远程命令执行RCE(CVE-2017-12629) 漏洞详情 漏洞复现 影响版本 修复方案 2.远程命令执行XXE(CVE-2017-12629) ...

  3. apache solr velocity 注入远程命令执行漏洞 (cve-2019-17558)

    Apache Solr 是一个开源的搜索服务器. 在其 5.0.0 到 8.3.1版本中,用户可以注入自定义模板,通过Velocity模板语言执行任意命令. 具体漏洞原理和POC可以参考: https ...

  4. cve-2017-12629 apache solr xxe rce 漏洞分析

    Versions Affected Apache Solr before 7.1.0 with Apache Lucene before 7.1 Elasticsearch, although it ...

  5. 开源搜索服务 Apache Solr 出现多个高危漏洞

     聚焦源代码安全,网罗国内外最新资讯! 开源搜素引擎服务 Apache Solr 公布了三个漏洞及其缓解措施.这三个漏洞是 CVE-2021-27905.CVE-2021-29262和CVE-2021 ...

  6. 搜索引擎之---Apache solr的实现

    Solr 是一种可供企业使用的.基于 Lucene 的搜索服务器,它支持层面搜索.命中醒目显示和多种输出格式.在这篇分两部分的文章中,Lucene Java™ 的提交人 Grant Ingersoll ...

  7. Apache Solr schema.xml及solrconfig.xml文件中文注解

    一.字段配置(schema) schema.xml位于solr/conf/目录下,类似于数据表配置文件, 定义了加入索引的数据的数据类型,主要包括type.fields和其他的一些缺省设置. 1.先来 ...

  8. Apache Solr入门教程(初学者之旅)

    2019独角兽企业重金招聘Python工程师标准>>> 写在前面:本文涉及solr入门的各方面,请逐行阅读,相信能帮助你对solr有个清晰全面的了解并能简单实用. 在Apache S ...

  9. apache solr rce cve-2019-0192 分析

    前言 漏洞详情:https://issues.apache.org/jira/browse/SOLR-13301 漏洞POC:https://github.com/mpgn/CVE-2019-0192 ...

最新文章

  1. 小白都能看懂的目前主流加密MD5验签
  2. 软件工程师到30岁就要转行?
  3. RabbitMQ,Springboot整合RabbitMQ实现 消息可靠性投递,Consumer ACK,TTL,死信队列,使用TTL+死信队列=延迟队列
  4. linux清空输入框,Linux uniq 命令
  5. code css怎么拿不到div_哈登和威少再怎么努力,也追不上杜兰特,因为刷子是拿不到冠军的...
  6. Flink Weekly | 每周社区动态更新
  7. Vlan中 tagged和untagged的区别
  8. MTK G-sensor 1
  9. RabbitMq Direct exchange路由模型
  10. 利用MATLAB仿真实现交通红绿灯识别的目的
  11. 我是如何用问卷调查小程序来赚钱的
  12. 回头再说 008 瞬
  13. CISP学习资料整理归纳
  14. 计算机核心基础知识2
  15. 基于PLC系统的点焊机器人数据通讯采集方案
  16. 第二课堂(D)杂志第二课堂(D)杂志社第二课堂(D)编辑部2022年第1期目录
  17. Android 界面置灰
  18. QWebEngineView 加载 flash插件参数配置
  19. 技术分享 | 四旋翼丝滑“绕⼋”⾃主轨迹运动
  20. Bentley 软件公司宣布 2018基础设施年度光辉大奖赛决赛入围者名单

热门文章

  1. c语言二fseek从文件头移动_编程C语言文件的随机读写
  2. authenticationstring mysql_mysql5.7修改密码password字段变成了authentication_string字段
  3. python安装虚拟环境没有activate_Python venv虚拟环境:Activate命令的作用
  4. python搭建自动化测试平台_如何用python语言搭建自动化测试环境
  5. 每三个数换行 用C语言表示,关于换行符:使用fscanf()读取每行3个数字的文件,为什么“%d%d%d%* c”和“%d%d%d”一样好?...
  6. Android中的Menu
  7. ctimespan 获取毫秒_VC++中通过CTime类获取日期差
  8. foobar2000 ios版怎么添加音乐_抖音怎么设置说完话后再放音乐 视频先配音后半段添加背景音乐...
  9. mysql的存储过程与事务_mysql的存储过程与事务入门
  10. ubuntu没有interfaces文件_ubuntu里终端中eth0为何没有显示IP地址