Hi ,
As per this post here
http://grokbase.com/t/lucene/solr-user/131jzcg3q2/how-to-round-solr-score.
I was able to use my custom fn in
sort(defType=func&q=socialDegree(id,1)&fl=score,*&sort=score%20asc) - works,
but can't facet on the
same(defType=func&q=socialDegree(id,1)&fl=score,*&facet=true&facet.field=score)
- doesn't work.
Exception:
org.apache.solr.common.SolrException: undefined field: "score"
at org.apache.solr.schema.IndexSchema.getField(IndexSchema.java:965)
at org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:294)
at
org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:423)
at org.apache.solr.request.SimpleFacets.getFacetCounts(SimpleFacets.java:205)
at
org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:78)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:208)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1816)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:448)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:269)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
Is there any way by which we can achieve this?
Thanks,
Mamta.
This email is intended for the person(s) to whom it is addressed and may
contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use,
distribution, copying, or disclosure by any person other than the addressee(s)
is strictly prohibited. If you have received this email in error, please notify
the sender immediately by return email and delete the message and any
attachments from your system.