此查询在solR中出现500错误:
msg : "Error from server at http://localhost:8983/solr/core_replica1: Exception during facet.field: text"
trace : "org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:
Error from server at http://localhost:8983/solr/core_replica1: Exception during facet.field: text\n\tat
我注意到,如果将参数“facet.limit”设置为小于5,则可以正常工作,否则不会。这是来自SolR的堆栈:
2018-03-29 15:26:24.137 INFO (qtp42121758-601) [c:core s:shard2 r:core_node1 x:core_shard2_replica1] o.a.s.c.S.Request [core_shard2_replica1]
webapp=/solr path=/select params={facet.field={!terms%3D$text__terms}text&distrib=false&qt=weblab_facet&fl=id,score&shards.purpose=32&text__terms=est&fq=date:
[2014-01-01T09:15:57.000Z/SECOND+TO+*]&shard.url=http://localhost:8983/solr/core_shard2_replica1/&rows=0&version=2&f.mainDate.facet.range.end=NOW/DAY&q=*&facet.limit=5&f.mainDate.facet.range.gap=%2B1DAY&
NOW=1522329984131&isShard=true&facet=true&f.mainDate.facet.range.start=NOW/DAY-5DAYS&wt=javabin&facet.sort=count} hits=5 status=500 QTime=0
2018-03-29 15:26:24.137 ERROR (qtp42121758-601) [c:core s:shard2 r:core_node1 x:core_shard2_replica1] o.a.s.s.HttpSolrCall null:org.apache.solr.common.SolrException: Exception during facet.field: text
at org.apache.solr.request.SimpleFacets.lambda$getFacetFieldCounts$0(SimpleFacets.java:809)
你知道为什么会发生这种错误吗?
我使用Solr 6.6.0。 我请求的字段是org.apache.solr.schema.TextField:
索引|标记化|存储| TermVector存储|使用TermVector存储偏移量|存储位置使用TermVector属性和shema
谢谢!
编辑:solr日志:
2018-03-29 15:26:24.137 ERROR (qtp42121758-601) [c:core s:shard2 r:core_node1 x:core_shard2_replica1]
o.a.s.h.RequestHandlerBase
org.apache.solr.common.SolrException: Exception during facet.field: text
at org.apache.solr.request.SimpleFacets.lambda$getFacetFieldCounts$0(SimpleFacets.java:809)
Caused by: java.lang.NullPointerException
at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:683)
并且:
@ContextConfiguration