solr或lucene中出现there are more terms than documents in field "name", but it's impossible to sort on tokenized fields异常
来源:互联网 发布:爬虫数据 编辑:程序博客网 时间:2024/06/06 01:48
在使用solr的排序时出现了类似下面的异常:
there are more terms than documents in field "name", but it's impossible to sort on tokenized fields
name在solr中为text型字段
根据
http://lucene.apache.org/java/3_0_0/api/core/org/apache/lucene/search/Sort.html
Encapsulates sort criteria for returned hits.
The fields used to determine sort order must be carefully chosen. Documents must contain a single term in such a field, and the value of the term should
indicate the document's relative position in a given sort order. The field must be indexed, but should not be tokenized, and does not need to be stored
(unless you happen to want it back with the rest of your document data). In other words:
document.add (new Field ("byNumber", Integer.toString(x), Field.Store.NO, Field.Index.NOT_ANALYZED));
的描述,sort的字段是"should not be tokenized",而solr中的配置是对text字段进行了tokeniz了的因此会出现类似下面的异常:
there are more terms than documents in field "name", but it's impossible to sort on tokenized fields
这里是nabble上一个用户关于这方面的问题
http://old.nabble.com/Exception-when-field-sort.-td21302894.html
- solr或lucene中出现there are more terms than documents in field "name", but it's impossible to sort on tokenized fields异常
- there are more terms than documents in field "XX", but it's impossible to sort on tokenized fields
- How to print out more than 20 items (documents) in MongoDB's shell?
- The mysterious stock bitmap: There's no way to summon it, but it shows up in various places
- Lucene/Solr 4.0-ALPHA – What’s In A Name?
- There's more to mathematics than rigour and proofs (作者:陶哲轩)
- NSInternalInconsistencyException', reason: 'attempt to insert row 0 into section 0, but there are on
- Eclipse中,出现No compiler is provided in this environment. Perhaps you are running on a JRE rather than
- it's hard more than i think
- There's Much More than Intel/AMD Inside
- It's been more than five months working here in Moravia Nanjing.
- php时间出现Warning: date(): It is not safe to rely on the system's timezone settings. You are *required*
- Swift reason: 'attempt to insert row 10 into section 0, but there are only 10 rows in section
- solr服务器安装在linux上面的时候出现there exists no core with name index异常
- 在SSM框架中出现Field error in object 'xxx' on field 'XXX': rejected value [];错误
- Why It’s Better to Text Than Call in a Mass Emergency
- Sudoku Solver, Now it's possible to solve expert level question in less than 2 minutes
- Maven异常: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a
- 结合PHP使用HTML表单访问单个和多个表单值
- 典型的中断服务程序
- 谷歌笑话
- 北京周边骑行路线
- 十二生肖在英文中的寓意
- solr或lucene中出现there are more terms than documents in field "name", but it's impossible to sort on tokenized fields异常
- PIC单片机开发中PICC编译环境的应用
- 正则表达式笔记
- 通过了09年下半年信息系统项目管理师考试,得瑟下
- fsck详解
- IList转DataTable
- SQL:為字符串外的臨時表插入數據
- 用Struts的Token机制解决表单重复提交
- 运算符重载,什么时候用友元?