我在 schema.xml 中添加了一个新的排序字段,在 SOLR 配置中上传了 DIHConfigFile.xml 和 Schema.xml。
<field name="recommendationRank" type="string" indexed="true" stored="true" multiValued="false" required="false"/>
在此之后,我确实运行了 zkcli,重新启动了 SOLR 和 zookeeper,并在 solr 中重新索引。
基于新字段的排序确实会给我返回结果,但我没有在响应中看到新字段本身。http://localhost:48100/solr/MainSystem1/select?indent=on&q= : &sort=recommendationRank_EN_US%20desc&wt=json
查询结果更新
{
"responseHeader":{
"zkConnected":true,
"status":0,
"QTime":11,
"params":{
"q":"recommendationRank_EN_US:2",
"indent":"on",
"wt":"json",
"debugQuery":"on",
"_":"1638448595617"}},
"response":{"numFound":0,"start":0,"docs":[]
},
"debug":{
"rawquerystring":"recommendationRank_EN_US:2",
"querystring":"recommendationRank_EN_US:2",
"parsedquery":"recommendationRank_EN_US:2",
"parsedquery_toString":"recommendationRank_EN_US:`\b\u0000\u0000\u0000\u0002",
"explain":{},
"QParser":"LuceneQParser",
"timing":{
"time":11.0,
"prepare":{
"time":0.0,
"query":{
"time":0.0},
"facet":{
"time":0.0},
"facet_module":{
"time":0.0},
"mlt":{
"time":0.0},
"highlight":{
"time":0.0},
"stats":{
"time":0.0},
"expand":{
"time":0.0},
"terms":{
"time":0.0},
"debug":{
"time":0.0}},
"process":{
"time":9.0,
"query":{
"time":8.0},
"facet":{
"time":0.0},
"facet_module":{
"time":0.0},
"mlt":{
"time":0.0},
"highlight":{
"time":0.0},
"stats":{
"time":0.0},
"expand":{
"time":0.0},
"terms":{
"time":0.0},
"debug":{
"time":1.0}}}}}