Solved my own problem.

Using multiple function range query parsers works fine against my custom 
function

&facet.query={!frange l=1 u=1} MyCustomSolrQuery(param1,param2, param3)
&facet.query={!frange l=2 u=2} MyCustomSolrQuery(param1,param2, param3)
Etc…

Gives me the counts for 1 then 2 etc

Not sure if there’s a better way, but this works



From: <Motulewicz>, Michael Motulewicz 
<michael.motulew...@healthsparq.com<mailto:michael.motulew...@healthsparq.com>>
Reply-To: "solr-user@lucene.apache.org<mailto:solr-user@lucene.apache.org>" 
<solr-user@lucene.apache.org<mailto:solr-user@lucene.apache.org>>
Date: Monday, April 13, 2015 at 11:40 AM
To: "solr-user@lucene.apache.org<mailto:solr-user@lucene.apache.org>" 
<solr-user@lucene.apache.org<mailto:solr-user@lucene.apache.org>>
Subject: Is it possible to facet on the results of a custom solr function?

Hi,

  I’m attempting to facet on the results of a custom solr function. I’ve been 
trying all kinds of combinations that I think would work, but keep getting 
errors. I’m starting to wonder if it is possible.

   I’m using Solr 4.0 and here is how I am calling:
&facet.query={!func}myCustomSolrQuery(param1, param2, param3)
   (My function returns an array of results like {“M:3”, “D:4”})

   This returns the same number as the total results.

  I’ve tried adding to the end of the query to break out the results like this:
&facet.query={!func}myCustomSolrQuery(param1, param2, param3) : (“M:3”)
  No matter what I put, I get parsing exceptions

Thanks for any help!
Mike


Ensure a sustainable future - only print when necessary.
IMPORTANT NOTICE: This communication, including any attachment, contains
information that may be confidential or privileged, and is intended solely for
the entity or individual to whom it is addressed.  If you are not the intended
recipient, you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message is strictly prohibited.
Nothing in this email, including any attachment, is intended to be a legally
binding signature.

Reply via email to