Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sorting 小写过滤器工厂不';docvalues=true时不工作_Sorting_Solr_Solr4 - Fatal编程技术网

Sorting 小写过滤器工厂不';docvalues=true时不工作

Sorting 小写过滤器工厂不';docvalues=true时不工作,sorting,solr,solr4,Sorting,Solr,Solr4,我正在尝试使用Solr和faced实现不区分大小写的排序 [复制] ....But When I get search result its not sorted case insensitive. It gives all camel case result first and then all lower case If I m having short names Banu Ajay anil sudhir Nilesh It sorts like Ajay, Banu, N

我正在尝试使用Solr和faced实现不区分大小写的排序

[复制]

....But When I get search result its not sorted case insensitive. It gives all camel case result first and then all lower case

If I m having short names

Banu

Ajay

anil

sudhir

Nilesh

It sorts like Ajay, Banu, Nilesh, anil, sudhir
...................
我在solr schema.xml文件中进行了以下更改(仅显示了相关字段和字段类型):


...............
.............
.................
................	
身份证件

这个问题可能是因为
DocValues
最初设计用于支持未分析的类型。它不支持
TextField

DocValue仅适用于特定字段类型。类型 选择此选项可确定将要使用的基础Lucene docValue类型 用过。可用的Solr字段类型有:

  • StrField和UUIDField:
    • 如果字段为单值(即多值为false),Lucene将使用排序类型
    • 如果字段是多值的,Lucene将使用排序集类型
  • 任何Trie*数字字段、日期字段和枚举字段。
    • 如果字段为单值(即多值为false),Lucene将使用数字类型
    • 如果字段是多值的,Lucene将使用排序集类型
(引自)

Solr Jira在添加对TextField()的docValues支持时遇到了一个问题,但仍然是开放的和未分配的


要在不删除
docValues=“true”
的情况下进行不区分大小写的排序,您必须使用字符串字段类型(
solr.StrField
),但因为您不能定义任何
来将输入流小写(或类似于在将数据发送到solr之前预处理字段内容)


如果您希望使用DocValues对字段进行标记以进行搜索和排序,则可以使用基于实际文本字段(不含DocValues)的copyField和要排序的string字段(处理为小写并启用DocValues)。

更改字段定义后是否已完全重新索引内容(在添加/删除docValues时)?@n0tting是的…好的,很抱歉问这个问题,但你永远不知道!:)我想我对此有一个线索,只需要在之前检查一下answering@Sharun你能分享一下你是如何实现更新请求处理器的吗?谢谢。”…将要排序的字段定义为字符串类型…“-您的意思是
StrField
?@Sharun yes,或者任何使用solr.StrField的字段(默认情况下,schema.xml中有
),但我们不能为StrField指定,对吗?据我所知,这些字段仅用于
TextField
(或从它派生的自定义类)。这就是为什么我建议使用copyField。但是如果没有analyzer,我如何解决主要问题(不区分大小写排序)?