That's an interesting link Shawn. Especially since it mentions the
possibility of sorting on pseudo-fields.

My delegating collector computes the customs stats and stores them in the
request context. I have a doc transformer that then grabs the stats for each
doc and inserts the data in the output. Here's a sample return doc:

     {
        "ITEM_DESCRIPTION": "FREIGHT PAY AMT FOR ITEM - 30934014",
        "SUPPLIER_NAME": "JESUS ACOSTA MORENO",
        "GL_ACCOUNT_NAME": "-",
        "PART_NUMBER": "-",
        "MCC_CODE": "SDBHAULER.NA",
        "[AggregationStats]": {
          "count": 1,
          "spend": 8402.39
        }
      },

My stats are in the [AggregationStats] "field". I don't know if this
qualifies as a pseudo-field. Sorting happens before my doc transformer is
called, so I don't think this data is available for sort. Like you said, I'm
not using a function query to create this data, so maybe this idea won't
work.

I'm going to try to use doc scoring. If I can make the score match my pseudo
fields then it might work.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Sorting-on-a-computed-value-tp4181875p4182060.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to