2016-10-04 65 views
2

我已經在這裏跟着指示爲Solr的設置導出處理程序,我試圖檢索數據時有問題:無法設置導出處理程序的Solr

Java.io.IOException: org.apache.solr.search.SyntaxError: xport RankQuery is required for xsort: rq={!xport} 
at org.apache.solr.response.SortingResponseWriter.write(SortingResponseWriter.java:100) 
at org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatchFilter.java:813) 
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:437) 
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:211) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
at org.apache.solr.servlet.SolrHadoopAuthenticationFilter$2.doFilter(SolrHadoopAuthenticationFilter.java:394) 
at org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:589) 
at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.doFilter(DelegationTokenAuthenticationFilter.java:291) 
at org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:552) 
at org.apache.solr.servlet.SolrHadoopAuthenticationFilter.doFilter(SolrHadoopAuthenticationFilter.java:399) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
at org.apache.solr.servlet.HostnameFilter.doFilter(HostnameFilter.java:86) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) 
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) 
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620) 
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) 
at java.lang.Thread.run(Thread.java:745) 
Caused by: org.apache.solr.search.SyntaxError: xport RankQuery is required for xsort: rq={!xport} 
... 26 more 

我已經設置了solrconfig Exporting Result Sets 所以我已經加入:.XML如在該指令中提到

<requestHandler name="/export" class="solr.SearchHandler"> 
    <lst name="invariants"> 
    <str name="rq">{!xport}</str> 
    <str name="wt">xsort</str> 
    <str name="distrib">false</str> 
    </lst> 
    <arr name="components"> 
    <str>query</str> 
    </arr> 
</requestHandler> 

但是當我使用下面的查詢,我得到上述錯誤:

http://big-d-cluster:8983/solr/trading/export?q=*%3A*&fl=id&sort=tradeTimestamp+desc 

任何想法可能導致這種情況?

我使用的是SolR 4.10,我沒有使用Sorj所以它應該可以工作,所以我沒有複製:Solrj exportIssue because user was not using SolR 4.10+

回答

0

我發現如果Solr索引沒有數據,您會收到上述錯誤。我填充它,它工作。

+0

我也有同樣的問題!感謝指針。 –