Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15030

Make score available as pseudo field in Function Queries

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • query

    Description

      Spinoff from Slack thread https://the-asf.slack.com/archives/CEKUCUNE9/p1606911042386800

      I'm caclulating a custom score to return as a field based on a function query, i.e.
      fl=udid,score,myScore:div(log(div(query($q),360.85104)),div(log(div(7.6316385,360.85104)),-3))
      This turns out to be very expensive due to the query($q) part. The score is already present when running this function, so is there a function that will access the score directly, e.g. score() instead of running a query($q)? Using plain score does not work as it is not a literal field.

      dsmiley suggested that making score a pseudo field, returning the score of the current hit, would be fairly easy now.

      Attachments

        Activity

          People

            Unassigned Unassigned
            janhoy Jan Høydahl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: