I have to score a property (download allowance for a broadband package 
expressed in GB) which can have values like 1, 2, 10, 20 and Infinity.
I want to use a Gauss scoring function.

{  
   "gauss":{  
      "services.Broadband.downloadAllowance.value":{  
         "origin":"Infinity",
         "scale":50
      }
   }
}


the _explain api returns this:


   - {
      - "value": "NaN",
      - "description": "function score, product of:",
      - 
      "details": [
         - 
         {
            - "value": 1,
            - "description": "match filter: *:*"
         },
         - 
         {
            - "value": "NaN",
            - "description": "Function for field 
            services.Broadband.downloadAllowance.value:",
            - 
            "details": [
               - 
               {
                  - "value": "NaN",
                  - "description": "exp(-0.5*pow(MIN of: 
                  [Math.max(Math.abs(Infinity(=doc value) - Infinity(=origin))) 
- 
                  0.0(=offset), 0)],2.0)/1803.3688011112042)"
               }
            ]
         }
      ]
   }
   
   
   It does recognize the Infinity word (it parses the query correctly) but 
   produces a NaN score.
   
   
   Any suggestion to the approach to use?
   
   
   For the sake of completeness, we are using a workaround, using another 
   field with a value of 999 when the value is Infinity, so the Gauss curve 
   works properly, but it's a workaround and we would like to be able to deal 
   with the "Infinity" value, which works great in Js.
   
   Thanks for your time!

-- 
Please update your bookmarks! We have moved to https://discuss.elastic.co/
--- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/c5bc935d-5763-4972-af33-435387f090c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to