已阅读1页,还剩5页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
solr TermsComponent数据统计介绍termscomponentsearchcomponent是一个简单的组件,提供了在field级别的访问index term的每一项的文件数。这可以用来在term级别而不是搜索或文档级做自动提示或者其他的东西,。在索引顺序检索条件很快实施以来,直接使用Lucene的termenum遍历术语词典。在某种意义上,这个组件提供field快速faceting在整个索引上面。返回的DOC频率是相匹配的项的文件数量,包括已标记为删除但尚未从索引中删除任何文件。如何使用使用termscomponent,用户可以通过各种各样的选择,以控制哪些term返回。支持的参数在类/solr/api/org/apache/solr/common/params/termsparams.html中参数包括: terms=true|false 打开TermsComponent terms.fl=FIELD NAME 必须的. 需要 terms的字段,可能是多个字段,可以使用terms.fl=field1&terms.fl=field2. terms.lower=The lower bound term 可选的. term 的开始。没有没有指定,使用空的字符串,代表开始的字段为空 terms.lower.incl=true|false 可选的. Include the lower bound term in the result set. Default is true. terms.mincount= - 可选的. The minimum doc frequency to return in order to be included. Results areinclusiveof the mincount (i.e. = mincount) terms.maxcount= -可选的. The maximum doc frequency. Default is -1 to have no upper bound. Results areinclusiveof the maxcount (i.e. = maxcount) terms.prefix=String -可选的. 限制terms开始的前缀 terms.regex=String -可选的,限制匹配的正则表达式匹配条件。 terms.regex.flag=case_insensitive|comments|multiline|literal|dotall|unicode_case|canon_eq|unix_lines -可选的. Flags to be used when evaluating the regular expression defined in the terms.regex parameter (see/j2se/1.5.0/docs/api/java/util/regex/Pattern.html#compile%28java.lang.String,%20int%29fore more details). This parameter can be defined multiple times (each time with different flag)Solr3.1 terms.limit=integer - The maximum number of terms to return. The default is 10. If 0, then include all terms. terms.upper=The upper bound term - The term to stop at. Either upper or terms.limit must be set. terms.upper.incl=true|false - Include the upper bound term in the result set. Default is false. terms.raw=true|false - If true, return the raw characters of the indexed term, regardless of if it is human readable. For instance, the indexed form of numeric numbers is not human readable. The default is false. terms.sort=count|index -如果count,各种各样的条款术语的频率(最高计数第一)。如果index,索引顺序返回条款。默认是count。.结果以列表形式返回分布式查询支持TermsComponent支持分布式查询,同样使用/trems,除此之前,还需要设置下面的查询参数。 shards - SeeDistributedSearch shards.qt -信号Solr,请求碎片应该发送到这个参数的请求处理程序例子下面的示例使用Solr实例教程位于/example目录下。简单http:/localhost:8983/solr/terms?terms.fl=name&terms.sort=index返回前十项的名称字段。返回: 0 1 1 6 1 1 1 6 1 1 4 1 指定下限http:/localhost:8983/solr/terms?terms.fl=name&terms.lower=a&terms.sort=indexreturn 0 0 2 2 1 1 1 1 1 1 1 1 使用Auto-Complete自动提示可参加Suggester,可在许多情况下,一个更好的解决方案。使用自动完成,加上用户输入作为前缀:http:/localhost:8983/solr/terms?terms.fl=name&terms.prefix=atreturn 0 120 5 5 你也可以使用JSON格式的返回格式http:/localhost:8983/solr/terms?terms.fl=name&terms.prefix=at&wt=json&omitHeader=trueterms:name:ata,1,ati,1说明:在solr1.4中,terms map添加到list中有bug不区分大小写的自动提示如果分析如果字段保存的情况下,仍然可以得到不区分大小写的自动完成通过使用正则表达式的支持与“case_insensitive“regex标示http:/localhost:8983/solr/terms?terms.fl=manu_exact&terms.regex=at.*&terms.regex.flag=case_insensitive。Result responseHeader: status:0, QTime:0, terms: manu_exact: ATI Technologies,1使用步骤1. solrconfig.xml添加如下配置 true false terms 2.URL访问http:/localhost:8983/solr/test_core/terms?q=*%3A*&wt=json&indent=true&terms.fl=field返回结果:默认按结果的出现频率倒序排序。 responseHeader: status:0, QTime:31, terms: field: 新闻图片,4262, 专题,4261, 设计,3229, 凤凰网,2020, 凤凰新媒体,1980, 创意
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 汽车追尾碰撞下儿童颈椎损伤机理与防护策略探究
- 汽车生产企业物流成本管控之道
- 商品房提前付款优惠协议
- 车载激光雷达点云处理技师考试试卷及答案
- 2026年交通运输合规考试真题及答案
- 有限空间应急救援计划
- 2026年“安康杯”安全培训教育知识竞赛试题及答案
- 2026年轻工企业机械防护安全规范
- 2026 高血压病人饮食的枣泥饼配菜课件
- 产后运动康复指导知情同意书
- 2026山东青岛海洋地质工程勘察院有限公司招聘2人笔试备考试题及答案解析
- 浙教版小学五年级劳动下册项目一+任务二+风筝的制作(教学课件)
- 2026年阿拉善职业技术学院单招职业技能考试题库附参考答案详解(夺分金卷)
- 2026江西省海济融资租赁股份有限公司社会招聘2人笔试备考题库及答案解析
- 涉医风险内部报告制度
- 职业技能等级鉴定电子设备装接工(高级)理论知识考试真题及答案
- 成人高考高起专英语复习资料
- 石药集团 绩效考核制度
- T∕CAMDI 165-2025 液相色谱用于临床维生素A、维生素E、25-羟基维生素D2 D3检测通 用技术要求
- 2026年1月浙江省高考(首考)化学试题(含标准答案)
- 光传输网络基本知识课件
评论
0/150
提交评论