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

SOLR: map() does not allow passing sub-functions in 4,5 parameters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 4.0
    • None
    • None
    • None

    Description

      I want to do:

      boost=map(achievement_count,1,1000,recip(achievement_count,-.5,10,25),1)

      I want to return recip(achievement_count,-.5,10,25) if achievement_count is between 1 and 1,000. FOr any other values I want to return 1.

      I cannot get it to work. I get the error below. Interesting this does work:

      boost=recip(map(achievement_count,0,0,200),.5,10,25)

      It almost appears that map() cannot take a function.

      Specified argument was out of the range of valid values.
      Parameter name: value
      Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

      Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
      Parameter name: value

      Source Error:

      An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

      Stack Trace:

      [ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
      Parameter name: value]
      System.Web.HttpResponse.set_StatusDescription(String value) +5200522
      FacilityService.Controllers.FacilityController.ActionCompleted(String actionName, IFacilityResults results) +265
      FacilityService.Controllers.FacilityController.SearchByPointCompleted(IFacilityResults results) +25
      lambda_method(Closure , ControllerBase , Object[] ) +114
      System.Web.Mvc.Async.<>c_DisplayClass7.<BeginExecute>b_5(IAsyncResult asyncResult) +283
      System.Web.Mvc.Async.<>c_DisplayClass41.<BeginInvokeAsynchronousActionMethod>b_40(IAsyncResult asyncResult) +22
      System.Web.Mvc.Async.<>c_DisplayClass3b.<BeginInvokeActionMethodWithFilters>b_35() +120
      System.Web.Mvc.Async.<>c_DisplayClass51.<InvokeActionMethodFilterAsynchronously>b_4b() +452
      System.Web.Mvc.Async.<>c_DisplayClass39.<BeginInvokeActionMethodWithFilters>b_38(IAsyncResult asyncResult) +15
      System.Web.Mvc.Async.<>c_DisplayClass2c.<BeginInvokeAction>b_22() +33
      System.Web.Mvc.Async.<>c_DisplayClass27.<BeginInvokeAction>b_24(IAsyncResult asyncResult) +240
      System.Web.Mvc.<>c_DisplayClass19.<BeginExecuteCore>b_14(IAsyncResult asyncResult) +28
      System.Web.Mvc.Async.<>c_DisplayClass4.<MakeVoidDelegate>b_3(IAsyncResult ar) +15
      System.Web.Mvc.AsyncController.EndExecuteCore(IAsyncResult asyncResult) +63
      System.Web.Mvc.Async.<>c_DisplayClass4.<MakeVoidDelegate>b_3(IAsyncResult ar) +15
      System.Web.Mvc.<>c_DisplayClassb.<BeginProcessRequest>b_4(IAsyncResult asyncResult) +42
      System.Web.Mvc.Async.<>c_DisplayClass4.<MakeVoidDelegate>b_3(IAsyncResult ar) +15
      System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +282

      Attachments

        1. SOLR-3963.2.patch
          8 kB
          Bill Bell

        Activity

          People

            hossman Chris M. Hostetter
            billnbell Bill Bell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: