lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peppeink <gnigr...@gmail.com>
Subject Json Facet Api Sort with Functional Query
Date Tue, 06 Sep 2016 10:23:37 GMT
Hi,

i'm trying to run a query with sort using json facet api like this

http://localhost:8983/solr/tip_active/select?
q=*:*
json.facet=
{
   "tipsters":{
      "type":"terms",
      "field":"sceneName",
      "numBuckets":true,
      "sort":"map(count,0,0,-999999, profitTot) desc",
      "offset":0,
      "limit":32,
      "facet":{
         "stakeTot":"sum(stakeBet)",
         "stakeAvg":"avg(stakeBet)",
         "profitTot":"sum(profitBet)",
         "oddsAvg":"avg(oddsBet)",
         "hitRate":"avg(hitRate)",
         "tipsterId":"avg(tipsterId)"
      }
   }
}

The index is composed of a list of bet possessed by various users.
The purpose of the query is to return various user statistics calculated on
the bet.
The critical part is the sort because they want to return the users who do
not have any bets for the last while everyone else ordered by profit. For do
this i make the sort with functional query map but i have this exception


java.lang.NullPointerException\n\tat
org.apache.solr.search.facet.FacetFieldProcessorFCBase$1.lessThan(FacetField.java:594)\n\tat
org.apache.solr.search.facet.FacetFieldProcessorFCBase$1.lessThan(FacetField.java:591)\n\tat
org.apache.lucene.util.PriorityQueue.upHeap(PriorityQueue.java:263)\n\tat
org.apache.lucene.util.PriorityQueue.add(PriorityQueue.java:140)\n\tat
org.apache.solr.search.facet.FacetFieldProcessorFCBase.findTopSlots(FacetField.java:624)\n\tat
org.apache.solr.search.facet.FacetFieldProcessorFCBase.getFieldCacheCounts(FacetField.java:568)\n\tat
org.apache.solr.search.facet.FacetFieldProcessorFCBase.process(FacetField.java:533)\n\tat
org.apache.solr.search.facet.FacetProcessor.processSubs(FacetProcessor.java:259)\n\tat
org.apache.solr.search.facet.FacetProcessor.fillBucket(FacetProcessor.java:352)\n\tat
org.apache.solr.search.facet.FacetQueryProcessor.process(FacetQuery.java:65)\n\tat
org.apache.solr.search.facet.FacetModule.process(FacetModule.java:97)\n\tat
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:293)\n\tat
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156)\n\tat
org.apache.solr.core.SolrCore.execute(SolrCore.java:2036)\n\tat
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:657)\n\tat
org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)\n\tat
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)\n\tat
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)\n\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\n\tat
org.eclipse.jetty.server.Server.handle(Server.java:518)\n\tat
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)\n\tat
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)\n\tat
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)\n\tat
org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)\n\tat
org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)\n\tat
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)\n\tat
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)\n\tat
java.lang.Thread.run(Thread.java:745)\n"

if i try to run with sort:profitTot desc the query work.

Any suggestion?

Thanks a lot 



--
View this message in context: http://lucene.472066.n3.nabble.com/Json-Facet-Api-Sort-with-Functional-Query-tp4294758.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message