已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- Checking Progress教学设计-2025-2026学年中职基础课-基础模块3-教科版(2021)-(英语)-52
- 高纯度异丁烷生产线项目节能评估报告
- 区科职领导干部在职自学考试试题模板
- 初中数学苏科版七年级上册3.1 字母表示数教学设计
- 二线城市房地产市场分析报告
- 2025年护理个案创意题目及答案集
- 2025年护理临床管理题目及答案
- 临床护士护理操作规范与应急预案
- 2025年中医执业助理医师考试强化测试题(附答案)
- 出货检验员跨部门协作沟通方案
- 土地整治项目管理
- 2025家具、家居用品买卖合同范本
- 2025版麻疹常见症状及护理建议
- (2025年)《巩固拓展脱贫攻坚成果同乡村振兴有效衔接应知应会》测试题及答案
- 反应釜用机械密封行业深度研究报告
- 储能集装箱电池充电桩配套方案
- 保险规划实务家庭保障与财富传承
- 2026中国进出口银行校园招聘笔试考试参考试题及答案解析
- 行政事业单位财务与会计试题题库(附答案+解析)
- 2025秋小学数学人教版一年级上册(三 认识立体图形)单元测试及答案
- 220KV输电线路运维策划方案
评论
0/150
提交评论