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

Function Query "map" variant that allows "target" to be an arbitrary ValueSource

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 4.7, 6.0
    • Component/s: search
    • Labels:
      None

      Description

      Currently, as documented at http://wiki.apache.org/solr/FunctionQuery#map, the "target" of a map must be a floating point constant. I propose that you should have at least the option of doing a map where the target is an arbitrary ValueSource.

      The particular use case that inspired this is that I want to be able to control how missing date fields affected boosting. In particular, I want to be able to use something like this in my function queries:

      map(mydatefield,0,0,ms(NOW))
      

      But this might have other uses.

      I'll attach an initial implementation.

        Attachments

        1. ASF.LICENSE.NOT.GRANTED--SOLR-1871.patch
          5 kB
          Chris Harris
        2. SOLR-1871.patch
          8 kB
          Shalin Shekhar Mangar
        3. SOLR-1871.patch
          7 kB
          Shalin Shekhar Mangar
        4. SOLR-1871.patch
          6 kB
          Chris Harris
        5. SOLR-1871.patch
          6 kB
          Chris Harris

          Activity

            People

            • Assignee:
              shalinmangar Shalin Shekhar Mangar
              Reporter:
              ryguasu Chris Harris
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: