[搜索引擎] 查询奇怪的异常

43385607 2012-01-09
线上系统使用solr,每秒大概不到10的请求,使用solr的范围查询的时候,
时间一长,就会报以下异常。
自己做测试,每秒请求3次,不管什么查询,只要包含范围查询[1 TO 10]这类似的,平均大概半个小时候就会出现以下异常,出现异常前都是正常的。
测试的url为:http://192.168.1.1:8099/search/select/?q=SELL_PRICE%3A[0+TO+*]&version=2.2&start=0&rows=10&indent=on

solr版本:3.4(3.5也测试过,同样有问题),没使用任何缓存
schema配置
<field name="SELL_PRICE" type="tfloat" indexed="true" stored="true" />

本机测试 windows+resin3+sun jdk
服务器测试 centos+resin4+jrockit  xmx xms都是1g



java.lang.NullPointerException
	at org.apache.lucene.search.NumericRangeQuery$NumericRangeTermEnum.next(NumericRangeQuery.java:563)
	at org.apache.lucene.search.NumericRangeQuery$NumericRangeTermEnum.<init>(NumericRangeQuery.java:507)
	at org.apache.lucene.search.NumericRangeQuery.getEnum(NumericRangeQuery.java:313)
	at org.apache.lucene.search.TermCollectingRewrite.collectTerms(TermCollectingRewrite.java:34)
	at org.apache.lucene.search.ConstantScoreAutoRewrite.rewrite(ConstantScoreAutoRewrite.java:87)
	at org.apache.lucene.search.MultiTermQuery$ConstantScoreAutoRewrite.rewrite(MultiTermQuery.java:215)
	at org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:304)
	at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:592)
	at org.apache.lucene.search.Searcher.createNormalizedWeight(Searcher.java:167)
	at org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:664)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:364)
	at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1282)
	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1162)
	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:362)
	at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:378)
	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:202)
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372)
	at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:357)
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
	at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:88)
	at CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:43)
	at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:88)
	at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187)
	at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:265)
	at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:273)
	at com.caucho.server.port.TcpConnection.run(TcpConnection.java:682)
	at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:743)
	at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:662)
	at java.lang.Thread.run(Thread.java:619)

Global site tag (gtag.js) - Google Analytics