已阅读5页,还剩1页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025华工科技产业股份有限公司招聘100人+笔试历年难易错考点试卷带答案解析
- 2025北京证券交易所全国中小企业股份转让系统有限责任公司人才引进笔试历年典型考点题库附带答案详解
- 金属非金属矿山开采工程农用地转用方案
- 2025内蒙古锡林郭勒盟锡林珠宝城老凤祥招聘26人笔试历年典型考点题库附带答案详解
- 2025内蒙古能源集团所属部分单位公开招聘137人笔试历年难易错考点试卷带答案解析
- 2025内蒙古巴彦淖尔市交通投资(集团)有限公司(第二批)招聘40人笔试历年常考点试题专练附带答案详解
- 2025兴业银行深圳分行校园招聘笔试历年典型考题及考点剖析附带答案详解2套
- 2025人保安康分公司银行保险部招聘笔试历年典型考题及考点剖析附带答案详解
- 新材料产业园新建及配套货运通道工程交通影响评价
- 企业资金链调度方案
- 中北大学《高等数学》2025-2026学年第一学期期末试卷(A卷)
- 电力系统运行与调度操作规范指南
- 2026年中国兵器工业集团招聘考试综合知识题库
- 2025年山东日照市初二地理生物会考真题试卷(含答案)
- 幼儿园幼儿申诉工作制度
- 北京工业职业技术学院《旅游接待业》2025-2026学年期末试卷
- 2026年四川省历年信息技术学业水平题库试题【必考】附答案详解
- 人教版三年级数学下册《周长》教学设计(表格式)
- 2025年医疗器械质量检验规范
- 房屋买卖合同2026年电子版下载
- 2024年湖南师范大学马克思主义基本原理概论期末考试题附答案解析
评论
0/150
提交评论